about summary refs log tree commit diff stats
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/event')
-rw-r--r--src/event/client_events.c1
-rw-r--r--src/event/common.c2
-rw-r--r--src/event/server_events.c12
3 files changed, 14 insertions, 1 deletions
diff --git a/src/event/client_events.c b/src/event/client_events.c
index ac52c6fe..8e2c7a0f 100644
--- a/src/event/client_events.c
+++ b/src/event/client_events.c
@@ -40,6 +40,7 @@
 #include <glib.h>
 
 #include "log.h"
+#include "chatlog.h"
 #include "database.h"
 #include "config/preferences.h"
 #include "event/common.h"
diff --git a/src/event/common.c b/src/event/common.c
index 5c17ca9a..84bc0d58 100644
--- a/src/event/common.c
+++ b/src/event/common.c
@@ -41,6 +41,7 @@
 #include "xmpp/roster_list.h"
 #include "xmpp/muc.h"
 #include "xmpp/xmpp.h"
+#include "xmpp/vcard_funcs.h"
 #include "database.h"
 #include "tools/bookmark_ignore.h"
 
@@ -73,6 +74,7 @@ ev_disconnect_cleanup(void)
 #endif
     log_database_close();
     bookmark_ignore_on_disconnect();
+    vcard_user_free();
 }
 
 gboolean
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 8c1ee04f..98b1ac5d 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -43,6 +43,7 @@
 #include "config/accounts.h"
 #include "profanity.h"
 #include "log.h"
+#include "chatlog.h"
 #include "database.h"
 #include "config/preferences.h"
 #include "config/tlscerts.h"
@@ -61,6 +62,7 @@
 #include "xmpp/chat_session.h"
 #include "xmpp/roster_list.h"
 #include "xmpp/avatar.h"
+#include "xmpp/vcard_funcs.h"
 
 #ifdef HAVE_LIBOTR
 #include "otr/otr.h"
@@ -101,7 +103,7 @@ sv_ev_login_account_success(char* account_name, gboolean secured)
 #endif
 
     log_database_init(account);
-
+    vcard_user_refresh();
     avatar_pep_subscribe();
 
     ui_handle_login_account_success(account, secured);
@@ -545,6 +547,14 @@ static void
 _sv_ev_incoming_ox(ProfChatWin* chatwin, gboolean new_win, ProfMessage* message, gboolean logit)
 {
 #ifdef HAVE_LIBGPGME
+    if (message->plain == NULL) {
+        if (message->body == NULL) {
+            log_error("Couldn't decrypt OX message and body was empty");
+            return;
+        }
+        message->plain = strdup(message->body);
+    }
+
     //_clean_incoming_message(message);
     chatwin_incoming_msg(chatwin, message, new_win);
     log_database_add_incoming(message);