EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
624 stars 88 forks source link

Is there a reason why skypeweb_got_imagemessage() uses PURPLE_MESSAGE_SYSTEM? #625

Open himselfv opened 5 years ago

himselfv commented 5 years ago

skypeweb_got_imagemessage() is a callback in in skypeweb_contacts.c which is called when the image has finished downloading from the URI. It posts the image as: purple_conversation_write_system_message_ts(conv, msg_tmp, PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_IMAGES, ts); This resolves to adding PURPLE_MESSAGE_SYSTEM flag.

Is there a reason why this is not simply NO_LOG + IMAGES? I'm using Spectrum2 and it filters out PURPLE_MESSAGE_SYSTEM and does not redirect them to the client currently, based probably on the idea that system messages are messages like "you have been disconnected" which are not real messages, in the XMPP sense.

I'm thinking of a way to remedy this, but maybe this can simply be made non-PURPLE_MESSAGE_SYSTEM?

EionRobb commented 5 years ago

Mostly due to laziness :) The SkypeImgMsgContext struct would need the sender name added, then all the function calls that use it would need that added as parameters If you did that though, then you could change from the purple_conversation_write_system_message_ts call to purple_conversation_write_message and get around the system message flag being added

himselfv commented 5 years ago

Like this?

himselfv commented 5 years ago

This also might improve https://github.com/EionRobb/skype4pidgin/issues/623

Thaodan commented 1 year ago

The bug should closed as #626 was merged.