mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 12:36:21 +00:00
Add OMEMO policy
There is 3 policy: - manual: OMEMO session are only started manually - automatic: OMEMO session are only started if they have been started manually before - always: OMEMO session are always started unless they have been ended manually before Closes #1040 and fixes #1052
This commit is contained in:
@@ -50,6 +50,9 @@
|
||||
#ifdef HAVE_LIBOTR
|
||||
#include "otr/otr.h"
|
||||
#endif
|
||||
#ifdef HAVE_OMEMO
|
||||
#include "omemo/omemo.h"
|
||||
#endif
|
||||
|
||||
static void _chatwin_history(ProfChatWin *chatwin, const char *const contact);
|
||||
|
||||
@@ -73,6 +76,13 @@ chatwin_new(const char *const barejid)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_OMEMO
|
||||
if (omemo_automatic_start(barejid)) {
|
||||
omemo_start_session(barejid);
|
||||
chatwin->is_omemo = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return chatwin;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user