about summary refs log tree commit diff stats
path: root/src/otr
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-28 22:40:59 +0000
committerJames Booth <boothj5@gmail.com>2014-12-28 22:45:25 +0000
commitac4b59eda08c66d037c794022fff7e3231768c72 (patch)
tree3a969a04d905cc17ed4937b65452ad85a6661200 /src/otr
parent53ecd3b383a01ddb71b6d7fe2320158510582e43 (diff)
downloadprofani-tty-ac4b59eda08c66d037c794022fff7e3231768c72.tar.gz
Fixed chat state for non OTR
Diffstat (limited to 'src/otr')
-rw-r--r--src/otr/otr.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c
index 3c0fe990..680c4c10 100644
--- a/src/otr/otr.c
+++ b/src/otr/otr.c
@@ -110,16 +110,7 @@ static void
 cb_inject_message(void *opdata, const char *accountname,
     const char *protocol, const char *recipient, const char *message)
 {
-    gboolean send_state = FALSE;
-    if (prefs_get_boolean(PREF_STATES)) {
-        if (!chat_session_exists(recipient)) {
-            chat_session_start(recipient, TRUE);
-        }
-        if (chat_session_get_recipient_supports(recipient)) {
-            chat_session_set_active(recipient);
-            send_state = TRUE;
-        }
-    }
+    gboolean send_state = chat_session_on_message_send(recipient);
     message_send_chat(recipient, NULL, message, send_state);
 }