--- a/mcabber/mcabber/xmpp.c Tue Nov 27 10:33:08 2012 +0100
+++ b/mcabber/mcabber/xmpp.c Tue Nov 27 15:26:26 2012 +0100
@@ -1104,17 +1104,6 @@
check_signature(bjid, rname, node_signed, decrypted_pgp);
#endif
-#ifdef HAVE_LIBOTR
- if (otr_enabled()) {
- decrypted_otr = (char*)body;
- otr_msg = otr_receive(&decrypted_otr, bjid, &free_msg);
- if (!decrypted_otr) {
- goto gotmessage_return;
- }
- body = decrypted_otr;
- }
-#endif
-
// Check for unexpected groupchat messages
// If we receive a groupchat message from a room we're not a member of,
// this is probably a server issue and the best we can do is to send
@@ -1163,6 +1152,17 @@
g_free(sbjid);
}
+#ifdef HAVE_LIBOTR
+ if (otr_enabled()) {
+ decrypted_otr = (char*)body;
+ otr_msg = otr_receive(&decrypted_otr, bjid, &free_msg);
+ if (!decrypted_otr) {
+ goto gotmessage_return;
+ }
+ body = decrypted_otr;
+ }
+#endif
+
{ // format and pass message for further processing
gchar *fullbody = NULL;
guint encrypted;