Mercurial > hg
comparison mcabber/src/hooks.c @ 1602:f4a2c6f767d1
Message Receipts support (XEP-0184)
author | franky |
---|---|
date | Wed, 24 Sep 2008 11:41:29 +0200 |
parents | dcd5d4c75199 |
children | 351427ef0b4b |
comparison
equal
deleted
inserted
replaced
1601:3efc92a48945 | 1602:f4a2c6f767d1 |
---|---|
249 | 249 |
250 // hk_message_out() | 250 // hk_message_out() |
251 // nick should be set for private messages in a chat room, and null for | 251 // nick should be set for private messages in a chat room, and null for |
252 // normal messages. | 252 // normal messages. |
253 void hk_message_out(const char *bjid, const char *nick, | 253 void hk_message_out(const char *bjid, const char *nick, |
254 time_t timestamp, const char *msg, guint encrypted) | 254 time_t timestamp, const char *msg, |
255 guint encrypted, gpointer xep184) | |
255 { | 256 { |
256 char *wmsg = NULL, *bmsg = NULL, *mmsg = NULL; | 257 char *wmsg = NULL, *bmsg = NULL, *mmsg = NULL; |
257 guint cryptflag = 0; | 258 guint cryptflag = 0; |
258 | 259 |
259 if (nick) { | 260 if (nick) { |
278 // have the message twice... | 279 // have the message twice... |
279 if (encrypted == ENCRYPTED_PGP) | 280 if (encrypted == ENCRYPTED_PGP) |
280 cryptflag = HBB_PREFIX_PGPCRYPT; | 281 cryptflag = HBB_PREFIX_PGPCRYPT; |
281 else if (encrypted == ENCRYPTED_OTR) | 282 else if (encrypted == ENCRYPTED_OTR) |
282 cryptflag = HBB_PREFIX_OTRCRYPT; | 283 cryptflag = HBB_PREFIX_OTRCRYPT; |
283 scr_WriteOutgoingMessage(bjid, wmsg, cryptflag); | 284 scr_WriteOutgoingMessage(bjid, wmsg, cryptflag, xep184); |
284 | 285 |
285 // We don't log private messages | 286 // We don't log private messages |
286 if (!nick) | 287 if (!nick) |
287 hlog_write_message(bjid, timestamp, 1, msg); | 288 hlog_write_message(bjid, timestamp, 1, msg); |
288 | 289 |