Changeset 91ae87d for protocols/jabber/message.c
- Timestamp:
- 2012-10-28T23:54:21Z (11 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.