majn / telegram-purple

Adds support for Telegram to Pidgin, Adium, Finch and other Libpurple based messengers.
GNU General Public License v2.0
735 stars 81 forks source link

Receive Pictures failed (over Spectrum2) #152

Open NeoBelerophon opened 8 years ago

NeoBelerophon commented 8 years ago

Hi,

I use telegram-purple with spectrum2 and prosody. As Client Pidgin and Conversations. When I receive a picture the client shows just an empty message.

In backend log there is an error for the time of reception:

9956: 2015-11-04 20:04:17,901 INFO libpurple: prpl-telegram:ping alarm 9956: 2015-11-04 20:04:20,903 INFO libpurple: prpl-telegram:ping alarm 9956: 2015-11-04 20:04:21,572 INFO libpurple: prpl-telegram:tgp_msg_on_loaded_document() 9956: 2015-11-04 20:04:21,649 ERROR backend: GLib g_string_free: assertion 'string != NULL' failed 9956: 2015-11-04 20:04:21,651 INFO libpurple: prpl-telegram:sending notifications: 1 9956: 2015-11-04 20:04:21,651 INFO libpurple: prpl-telegram:send all pending ack 9956: 2015-11-04 20:04:21,656 INFO libpurple: prpl-telegram:tgl_do_mark_read (113626098) 9956: 2015-11-04 20:04:30,908 INFO libpurple: prpl-telegram:ping alarm 9956: 2015-11-04 20:04:31,900 INFO libpurple: prpl-telegram:ping alarm

spectrum2 log:

2015-11-04 20:04:02,441 INFO NetworkPluginServer: PING to 0xc169e0 (ID=9956) 2015-11-04 20:04:21,980 INFO ConversationManager: : Adding conversation 113626098 2015-11-04 20:04:22,443 INFO NetworkPluginServer: PING to 0xc169e0 (ID=9956)

majn commented 8 years ago

Are you sure that pictures in messages are supported/preserved by the libpurple transport of Spectrum?

Cause essentially that would mean that spectrum searches the tag in the messages received over libpurple, fetch all found image from the purple imgstore, and then put the picture into whatever format Jabber/XMPP uses for sending images.

NeoBelerophon commented 8 years ago

What tag / encoding / standard is used for picture transfer right now? Not sure if there is an XEP for images but it would be easy to map it to XEP-0096 or RFC 2616

majn commented 8 years ago

Well, basically I insert an into the message, where 123 is the ID of the displayed picture in the purple imagestore.