Until the new libotr API is deployed, this hack will solve the problem for pidgin-otr-3.2.0.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/
>From f4eedc912511c77380016d9e54633aa39c088cbf Mon Sep 17 00:00:00 2001
From: Howard Chu <h...@symas.com>
Date: Mon, 19 Dec 2011 16:21:08 -0800
Subject: [PATCH] Treat unencrypted messages as normal

So they generate "New message received" notifications
---
 gtk-dialog.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gtk-dialog.c b/gtk-dialog.c
index 03d4602..5245969 100644
--- a/gtk-dialog.c
+++ b/gtk-dialog.c
@@ -1022,6 +1022,7 @@ static int otrg_gtk_dialog_display_otr_message(const char *accountname,
     /* See if there's a conversation window we can put this in. */
     PurpleAccount *account;
     PurpleConversation *conv;
+    int level = PURPLE_MESSAGE_SYSTEM;
 
     account = purple_accounts_find(accountname, protocol);
     if (!account) return -1;
@@ -1029,7 +1030,10 @@ static int otrg_gtk_dialog_display_otr_message(const char *accountname,
     conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, username, account);
     if (!conv) return -1;
 
-    purple_conversation_write(conv, NULL, msg, PURPLE_MESSAGE_SYSTEM, time(NULL));
+    if (!strncmp(msg, "<b>The following message",
+	sizeof("<b>The following message")-1))
+	level = PURPLE_MESSAGE_RECV;
+    purple_conversation_write(conv, NULL, msg, level, time(NULL));
 
     return 0;
 }
-- 
1.7.1

Reply via email to