- Timestamp:
- 2012-10-28T23:54:21Z (12 years ago)
- Branches:
- master
- Children:
- f21ad37
- Parents:
- 4d82e50 (diff), 1444be5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols/jabber
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/iq.c
r4d82e50 r91ae87d 128 128 XMLNS_MUC, 129 129 XMLNS_PING, 130 XMLNS_RECEIPTS, 130 131 XMLNS_SI, 131 132 XMLNS_BYTESTREAMS, -
protocols/jabber/jabber.h
r4d82e50 r91ae87d 227 227 #define XMLNS_TIME "urn:xmpp:time" /* XEP-0202 */ 228 228 #define XMLNS_PING "urn:xmpp:ping" /* XEP-0199 */ 229 #define XMLNS_RECEIPTS "urn:xmpp:receipts" /* XEP-0184 */ 229 230 #define XMLNS_VCARD "vcard-temp" /* XEP-0054 */ 230 231 #define XMLNS_DELAY "jabber:x:delay" /* XEP-0091 */ -
protocols/jabber/message.c
r4d82e50 r91ae87d 29 29 char *from = xt_find_attr( node, "from" ); 30 30 char *type = xt_find_attr( node, "type" ); 31 char *id = xt_find_attr( node, "id" ); 31 32 struct xt_node *body = xt_find_node( node->children, "body" ), *c; 33 struct xt_node *request = xt_find_node( node->children, "request" ); 32 34 struct jabber_buddy *bud = NULL; 33 35 char *s, *room = NULL, *reason = NULL; … … 35 37 if( !from ) 36 38 return XT_HANDLED; /* Consider this packet corrupted. */ 39 40 if( request && id ) 41 { 42 /* Send a message receipt (XEP-0184), looking like this: 43 * <message 44 * from='kingrichard@royalty.england.lit/throne' 45 * id='bi29sg183b4v' 46 * to='northumberland@shakespeare.lit/westminster'> 47 * <received xmlns='urn:xmpp:receipts' id='richard2-4.1.247'/> 48 * </message> */ 49 struct xt_node *received, *receipt; 50 51 received = xt_new_node( "received", NULL, NULL ); 52 xt_add_attr( received, "xmlns", XMLNS_RECEIPTS ); 53 xt_add_attr( received, "id", id ); 54 receipt = jabber_make_packet( "message", NULL, from, received ); 55 56 jabber_write_packet( ic, receipt ); 57 xt_free_node( receipt ); 58 } 37 59 38 60 bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT );
Note: See TracChangeset
for help on using the changeset viewer.