about summary refs log tree commit diff stats
path: root/src/profanity.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/profanity.c')
-rw-r--r--src/profanity.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/profanity.c b/src/profanity.c
index 9c729ca1..ac45b5f6 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -19,7 +19,6 @@
  * along with Profanity.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-
 #include "config.h"
 
 #include <locale.h>
@@ -40,6 +39,7 @@
 #include "contact.h"
 #include "log.h"
 #include "muc.h"
+#include "otr.h"
 #include "resource.h"
 #include "ui/notifier.h"
 #include "ui/ui.h"
@@ -249,6 +249,9 @@ void
 prof_handle_login_account_success(char *account_name)
 {
     ProfAccount *account = accounts_get_account(account_name);
+#ifdef HAVE_LIBOTR
+    otr_account_load(account);
+#endif
     resource_presence_t resource_presence = accounts_get_login_presence(account->name);
     contact_presence_t contact_presence = contact_presence_from_resource_presence(resource_presence);
     cons_show_login_success(account);
@@ -632,6 +635,9 @@ _init(const int disable_tls, char *log_level)
     log_info("Initialising contact list");
     roster_init();
     muc_init();
+#ifdef HAVE_LIBOTR
+    otr_init();
+#endif
     atexit(_shutdown);
 }