about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-09-08 20:18:31 +0100
committerJames Booth <boothj5@gmail.com>2015-09-08 20:18:31 +0100
commitb266e4d03512fe337c811b8cda52627c477a9350 (patch)
tree366ab6891e76681ae75bbdc92ac2b6c2313daa0d /src/xmpp
parent3883e04d248ea7522d71e135338087b5d2a8e91f (diff)
downloadprofani-tty-b266e4d03512fe337c811b8cda52627c477a9350.tar.gz
Pass delay timestamp to all incoming chat events
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/message.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index a46ead5c..5581521c 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -778,17 +778,13 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void * con
     if (body) {
         char *message = xmpp_stanza_get_text(body);
         if (message) {
-            if (timestamp) {
-                sv_ev_delayed_message(jid->barejid, message, timestamp);
-            } else {
-                char *enc_message = NULL;
-                xmpp_stanza_t *x = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_ENCRYPTED);
-                if (x) {
-                    enc_message = xmpp_stanza_get_text(x);
-                }
-                sv_ev_incoming_message(jid->barejid, jid->resourcepart, message, enc_message);
-                xmpp_free(ctx, enc_message);
+            char *enc_message = NULL;
+            xmpp_stanza_t *x = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_ENCRYPTED);
+            if (x) {
+                enc_message = xmpp_stanza_get_text(x);
             }
+            sv_ev_incoming_message(jid->barejid, jid->resourcepart, message, enc_message, timestamp);
+            xmpp_free(ctx, enc_message);
 
             _receipt_request_handler(stanza);