Fixing (Encryption + AIM Direct IM)

Evan Schoenberg evan.s at dreskin.net
Wed Dec 17 11:21:48 EST 2008


Currently, oscar.c's purple_odc_send_im() gets called after all  
plugins have a chance to act via the "sending-im-msg" signal.   
purple_odc_send_im() then does the parsing on the message to change  
any IMG tags (associated with purple imgstore objects) into the  
appropriate tag and binary data to send images over the wire.

On the other side, peer_odc_handle_payload() parses the received  
message to do the reverse conversion: binary data to purple imgstore  
objects and their tag references.

That's all well and good except that it fails miserably if the message  
being sent is encrypted, as with the OTR plugin, because  
purple_odc_send_im() and peer_odc_handle_payload() both see encrypted  
data and have no way of doing their thing.

I'd like to fix this.  One thought I had was to add a prpl callback  
which can be queried to see if the prpl will handle posting sending-im- 
msg and receiving-im-msg itself.  If it returns true, then the normal  
signals won't be posted by server.c/conversation.c.  Oscar prpl would  
return true only if the chat is a direct im chat... and then would  
post those signals from the appropriate _odc_ methods at the  
appropriate time.  Does that sound reasonable?  Anyone have a better  
solution?

Cheers,
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20081217/69e6fa98/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20081217/69e6fa98/attachment.sig>


More information about the Devel mailing list