mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
End OTR sessions on lost server connection
This commit is contained in:
parent
a90e109f7e
commit
51f033ae42
@ -152,6 +152,23 @@ sv_ev_lost_connection(void)
|
|||||||
{
|
{
|
||||||
cons_show_error("Lost connection.");
|
cons_show_error("Lost connection.");
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBOTR
|
||||||
|
GSList *recipients = wins_get_chat_recipients();
|
||||||
|
GSList *curr = recipients;
|
||||||
|
while (curr) {
|
||||||
|
char *barejid = curr->data;
|
||||||
|
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||||
|
if (chatwin && otr_is_secure(barejid)) {
|
||||||
|
chatwin_otr_unsecured(chatwin);
|
||||||
|
otr_end_session(barejid);
|
||||||
|
}
|
||||||
|
curr = g_slist_next(curr);
|
||||||
|
}
|
||||||
|
if (recipients) {
|
||||||
|
g_slist_free(recipients);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
muc_invites_clear();
|
muc_invites_clear();
|
||||||
chat_sessions_clear();
|
chat_sessions_clear();
|
||||||
ui_disconnected();
|
ui_disconnected();
|
||||||
|
Loading…
Reference in New Issue
Block a user