libpurple IM conversation name
Zoltán Sólyom
z-ismeretlen at freemail.hu
Fri Apr 12 12:34:55 EDT 2013
Thanks for checking the log.
The xml I get is:
<message from='friend at jabber.org/48154a0d3b8196c6' to='me at jabber.org'
type='chat' id='purplea48c5494'><active
xmlns='http://jabber.org/protocol/chatstates'/><body>receive
this</body></message>
My guess is that the extra characters after the name might depend on the
protocol. I use xmpp (jabber) and not msn for testing. After reading the
code for a while I found the solution. I have to call
purple_normalize(account, name) to get a string for comparison. This is
what is called inside libpurple as well when checking whether two
conversations are the same.
On 13/04/12 17:35, Duncan Berriman wrote:
> Hi,
>
> I use the same routines and method (on linux - pidgin-2.10.4) and see no
> issue and happen to log the incoming messages.
>
> Example from my log when a buddy sends me a new message/conversation.
>
> "me at msn.com" (prpl-msn) 15:23:17 friend at msn.com: <FONT FACE="Segoe UI"><FONT
> COLOR="#000000">test</FONT></FONT>
>
> In this case the sender is friend at msn.com
>
> Not sure where the 'Hex' you are seeing is coming from.
>
> Regards
> Duncan
>
>> -----Original Message-----
>> From: devel-bounces at pidgin.im [mailto:devel-bounces at pidgin.im] On Behalf
>> Of Zoltán Sólyom
>> Sent: 12 April 2013 15:46
>> To: Pidgin Development List
>> Subject: libpurple IM conversation name
>>
>> I got libpurple work in VS so now I'm trying to use it, but I'd like to
>> ask for a little assistance.
>>
>> I can start conversations and users can write me, and both opens a
>> window. The callback for the "received-im-msg" signal gets the name of
>> the sender, that I pass to purple_conversation_new. The name has a
>> hexadecimal looking string after it, but the conversation works
>> correctly. If I want to send a message first, I don't know about that
>> string, so I just create a conversation with the buddy name. Both work,
>> but I need a way to identify conversation windows, and the only thing I
>> can use is the name of the conversation/buddy. Is it ok to just throw
>> away that hexadecimal string when I check if the conversation names are
>> equal? And if that string can be removed, is it the same format in every
>> protocol and server? Or maybe this approach is completely wrong?
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at pidgin.im
>> http://pidgin.im/cgi-bin/mailman/listinfo/devel
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>
>
More information about the Devel
mailing list