diff options
author | James Booth <boothj5@gmail.com> | 2015-09-08 20:18:31 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-09-08 20:18:31 +0100 |
commit | b266e4d03512fe337c811b8cda52627c477a9350 (patch) | |
tree | 366ab6891e76681ae75bbdc92ac2b6c2313daa0d /src/xmpp | |
parent | 3883e04d248ea7522d71e135338087b5d2a8e91f (diff) | |
download | profani-tty-b266e4d03512fe337c811b8cda52627c477a9350.tar.gz |
Pass delay timestamp to all incoming chat events
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/message.c | 16 |
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); |