mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-01 22:56:22 +00:00
Merge pull request #1549 from DebXWoody/bugfix/fix1530
Restart OMEMO Session after lost connection
This commit is contained in:
@@ -52,6 +52,10 @@
|
|||||||
#include "xmpp/roster_list.h"
|
#include "xmpp/roster_list.h"
|
||||||
#include "tools/http_upload.h"
|
#include "tools/http_upload.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_OMEMO
|
||||||
|
#include "omemo/omemo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static GHashTable* windows;
|
static GHashTable* windows;
|
||||||
static int current;
|
static int current;
|
||||||
static Autocomplete wins_ac;
|
static Autocomplete wins_ac;
|
||||||
@@ -864,6 +868,24 @@ wins_reestablished_connection(void)
|
|||||||
if (window->type != WIN_CONSOLE) {
|
if (window->type != WIN_CONSOLE) {
|
||||||
win_println(window, THEME_TEXT, "-", "Connection re-established.");
|
win_println(window, THEME_TEXT, "-", "Connection re-established.");
|
||||||
|
|
||||||
|
#ifdef HAVE_OMEMO
|
||||||
|
if (window->type == WIN_CHAT) {
|
||||||
|
ProfChatWin* chatwin = (ProfChatWin*)window;
|
||||||
|
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||||
|
if (chatwin->is_omemo) {
|
||||||
|
win_println(window, THEME_TEXT, "-", "Restarted OMEMO session.");
|
||||||
|
omemo_start_session(chatwin->barejid);
|
||||||
|
}
|
||||||
|
} else if (window->type == WIN_MUC) {
|
||||||
|
ProfMucWin* mucwin = (ProfMucWin*)window;
|
||||||
|
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
||||||
|
if (mucwin->is_omemo) {
|
||||||
|
win_println(window, THEME_TEXT, "-", "Restarted OMEMO session.");
|
||||||
|
omemo_start_muc_sessions(mucwin->roomjid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if current win, set current_win_dirty
|
// if current win, set current_win_dirty
|
||||||
if (wins_is_current(window)) {
|
if (wins_is_current(window)) {
|
||||||
win_update_virtual(window);
|
win_update_virtual(window);
|
||||||
|
|||||||
Reference in New Issue
Block a user