hoehermann / purple-signald

Pidgin libpurple bridge to signald.
GNU General Public License v3.0
153 stars 19 forks source link

Leaving a group when the group chat is tab is closed #21

Closed ttlmax closed 2 years ago

ttlmax commented 4 years ago

Great, that groups a supported now!

However, whenever I close a group chat tab/window I am automatically kicked off the group. Is this behavior intended?

ttlmax commented 4 years ago

THis seems to work when the chat is set to "persistent" in the buddy list. Can this be done automatically when a group is added?

hoehermann commented 4 years ago

Automatically setting "persistent" was not completely straight-forward. @fancypantalons Can you look into this?

fancypantalons commented 4 years ago

Huh, the latest version of libpurple-signald should do this. If you look at groups.c:228 you can see the line where it sets the chat as persistent in Pidgin. That was pushed in a91d9635 on July 18th.

@ttlmax are you running the latest codebase? If so, and you're not seeing this behaviour, then that's... odd...

ttlmax commented 4 years ago

You are right, I am seeing the code line. However, when creating a new chat within the signal account, this chat is created without the "persistent" flag. I have added a debug info and the if-branch with line 228 is not executed.

fancypantalons commented 4 years ago

You are right, I am seeing the code line. However, when creating a new chat within the signal account, this chat is created without the "persistent" flag. I have added a debug info and the if-branch with line 228 is not executed.

Oooh wait, so, are you first creating the chat with Pidgin (and then inviting people into it)?

If so, then the plugin does not automatically make those chats persistent. That's only done for chats you're invited into, or chats created via some other client, such that in Pidgin you're being force-joined into the group chat.

That could certainly be done, though it'd go against the way Pidgin normally works. i.e., typically a chat created in Pidgin isn't persistent unless the user specifically requests it.

But given Signal's group chats are kinda special, I'd be opening to violating that rule for libpurple-signald.

Assuming I'm right and it can be done (I can imagine how it might be done but I haven't tried it yet ;).

ttlmax commented 4 years ago

Ah, okay, when creating the group in signal first, then the group is listed as "persistent" after pidgin has started.

hoehermann commented 4 years ago

Seconded. Treating all Signal groups as "persistent" looks like a good idea to me, too.

hoehermann commented 2 years ago

Persistent chats behaved wonky for me: After closing the chat conversation window, new messages would not open up the window.

I now changed the behaviour: By default, the group is never left. There is an action to explicitly leave the group in the chat's extended menu.

For non-Pidgin users, there is another option: Remove the chat from the buddy list, then leave the conversation.

I hope this resolves this issue for good.