hoehermann / purple-gowhatsapp

Pidgin/libpurple plug-in for WhatsApp Web.
GNU General Public License v3.0
287 stars 35 forks source link

Have more control about windows being brought to front #147

Open samtrek opened 1 year ago

samtrek commented 1 year ago

I have observed that group messages from the plugin are automatically shown, while normal messages are kept in the background: that is messaging windows are not raised, is there anyway messages from groups can also be made to remain to remain in the background or show notification until the pidgin icon is clicked?

Seems status broadcast has also been re-enabled, this at times causes barrage of message from contacts, can it be included in the option again to disable status contacts or find a new solution if disabling status contacts is conflicting with the overall functioning of the plugin.

hoehermann commented 1 year ago

I do not know any way to control the behaviour of the window focus. In fact, I do not know why it is different for chats and direct conversations at all. For normal incoming messages, I call the official functions serv_got_joined_chat or serv_got_im. Both call purple_conversation_new, create_conversation, pidgin_conv_new,private_gtkconv_new, pidgin_conv_placement_place, conv_placement_new_window, pidgin_conv_window_show, and finally gtk_widget_show. When displaying the copies of outgoing "synced" (sent from another device) messages, the serv_* functions are omitted, though after that, the code path should be the same. I could build Pidgin with debug symbols to investigate this in detail, but the chances for me actually doing that are rather slim.

I was using a pretty daft comparison for filtering out the status broadcasts. I noticed there was an official method to do it. Apparently I am using it wrong. I hope I can look into it this weekend. But nice to know receiving status broadcasts are no longer resulting in a crash. I still have no idea why my phone (and to that extent my linked Pidgin) will not receive any status broadcasts, so I cannot test it. Does that "barrage of messages" occur once after linking or every time when connecting and catching up?

samtrek commented 1 year ago
  1. The first issue raised can be worked on later when you have time, or you can relabel it for those who are more knowledgeable with pidgin. I have little or no knowledge in this field.
  2. If the option to disable status broadcast that was in the previous version can be re-enable, I will b e glad. The reason is that the status window continue to raise itself at inconvenient time barrage of message = some people decide to post several messages on their status wall at time.
hoehermann commented 1 year ago

Thank you for your feedback and patient testing. 1513f88 now contains an option to ignore status broadcasts (they are ignored by default).

samtrek commented 1 year ago

The option to disable status broadcast is back in 1513f88. Thank you for your effort towards the development of the plugin. Will be closing this issue hope you will one time in the future take a look at the notifications for group messages as discussed above.

hoehermann commented 1 year ago

Thank you for the feedback. For reminding me about the window presentation, I want to keep this issue open. I tend to completely forget about closed issues. 😅

samtrek commented 1 year ago

Did not want to put too much pressure on you, so I decided to close it since you said you may likely not work on it, with or without it is still great.