Add OMEMO message encryption and decryption

This commit is contained in:
Paul Fariello
2019-02-26 20:33:06 +01:40
parent b1ae220aa4
commit 0fb27dc496
18 changed files with 681 additions and 35 deletions

View File

@@ -54,6 +54,10 @@
#include "pgp/gpg.h"
#endif
#ifdef HAVE_OMEMO
#include "omemo/omemo.h"
#endif
jabber_conn_status_t
cl_ev_connect_jid(const char *const jid, const char *const passwd, const char *const altdomain, const int port, const char *const tls_policy)
{
@@ -203,6 +207,21 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg, const char *const oo
#endif
#endif
#ifdef HAVE_OMEMO
if (chatwin->is_omemo) {
omemo_on_message_send(chatwin, plugin_msg, request_receipt);
} else {
char *id = message_send_chat(chatwin->barejid, plugin_msg, oob_url, request_receipt);
chat_log_msg_out(chatwin->barejid, plugin_msg);
chatwin_outgoing_msg(chatwin, plugin_msg, id, PROF_MSG_PLAIN, request_receipt);
free(id);
}
plugins_post_chat_message_send(chatwin->barejid, plugin_msg);
free(plugin_msg);
return;
#endif
// OTR unsupported, PGP unsupported
#ifndef HAVE_LIBOTR
#ifndef HAVE_LIBGPGME