diff options
author | Paul Fariello <paul@fariello.eu> | 2019-02-19 06:24:47 +0140 |
---|---|---|
committer | Paul Fariello <paul@fariello.eu> | 2019-04-08 11:50:12 +0200 |
commit | 4a5b672f95266990549ddc7eb2366a99cfddeefa (patch) | |
tree | e40106e6c58b82de1e5b23ab2b4a176a6f814026 /src/command/cmd_funcs.c | |
parent | 6b064cfde4456c25bd9dbcbfe0a79262ebcb3599 (diff) | |
download | profani-tty-4a5b672f95266990549ddc7eb2366a99cfddeefa.tar.gz |
Link against libsignal-protocol-c
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index b2f0ee7f..97ce2025 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -85,6 +85,10 @@ #include "pgp/gpg.h" #endif +#ifdef HAVE_LIBSIGNAL_PROTOCOL +#include "omemo/omemo.h" +#endif + #ifdef HAVE_GTK #include "ui/tray.h" #endif @@ -7872,3 +7876,22 @@ _cmd_set_boolean_preference(gchar *arg, const char *const command, g_string_free(enabled, TRUE); g_string_free(disabled, TRUE); } + +gboolean +cmd_omemo_init(ProfWin *window, const char *const command, gchar **args) +{ +#ifdef HAVE_LIBSIGNAL_PROTOCOL + if (connection_get_status() != JABBER_CONNECTED) { + cons_show("You must be connected with an account to initialize omemo"); + return TRUE; + } + + ProfAccount *account = accounts_get_account(session_get_account_name()); + omemo_init(account); + cons_show("Initialized omemo"); + return TRUE; +#else + cons_show("This version of Profanity has not been built with Omemo support enabled"); + return TRUE; +#endif +} |