Display warning when opening a chat the current user is no longer a member of
This commit is contained in:
parent
0664c5b2fe
commit
293c6049a6
1 changed files with 4 additions and 0 deletions
|
@ -50,6 +50,10 @@ PurpleConversation *chat_show (PurpleConnection *gc, int id) {
|
|||
}
|
||||
convo = p2tgl_got_joined_chat (conn->TLS, &P->chat);
|
||||
chat_users_update (conn->TLS, &P->chat);
|
||||
if (PURPLE_CONNECTION_IS_CONNECTED(gc) && ! chat_is_member(conn->TLS->our_id, &P->chat)) {
|
||||
p2tgl_conversation_write (convo, TGL_MK_CHAT(id), "You are no longer a member of this chat.",
|
||||
PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LOG, (int)time (NULL));
|
||||
}
|
||||
}
|
||||
|
||||
return convo;
|
||||
|
|
Loading…
Add table
Reference in a new issue