skype4pidgin icon indicating copy to clipboard operation
skype4pidgin copied to clipboard

Is there a reason why skypeweb_got_imagemessage() uses PURPLE_MESSAGE_SYSTEM?

Open himselfv opened this issue 6 years ago • 4 comments

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?

himselfv avatar Jan 03 '19 21:01 himselfv

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

EionRobb avatar Jan 03 '19 21:01 EionRobb

Like this?

himselfv avatar Jan 04 '19 10:01 himselfv

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

himselfv avatar Jan 04 '19 10:01 himselfv

The bug should closed as #626 was merged.

Thaodan avatar Sep 24 '22 17:09 Thaodan