comparison libpurple/protocols/jabber/message.c @ 17877:34411cc535de

Implemented XEP-0203: Delayed Delivery
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 20 Jun 2007 00:22:16 +0000
parents d8ce7ff7aeb3
children b8de63d3bf89
comparison
equal deleted inserted replaced
17876:7a3a66c6530a 17877:34411cc535de
371 jm->error = g_strdup_printf("%s%s", text ? text : "", 371 jm->error = g_strdup_printf("%s%s", text ? text : "",
372 code_txt ? code_txt : ""); 372 code_txt ? code_txt : "");
373 373
374 g_free(code_txt); 374 g_free(code_txt);
375 g_free(text); 375 g_free(text);
376 } else if(!strcmp(child->name, "delay") && xmlns && !strcmp(xmlns,"urn:xmpp:delay")) {
377 const char *timestamp = xmlnode_get_attrib(child, "stamp");
378 jm->delayed = TRUE;
379 if(timestamp)
380 jm->sent = purple_str_to_time(timestamp, TRUE, NULL, NULL, NULL);
376 } else if(!strcmp(child->name, "x")) { 381 } else if(!strcmp(child->name, "x")) {
377 if(xmlns && !strcmp(xmlns, "jabber:x:event")) { 382 if(xmlns && !strcmp(xmlns, "jabber:x:event")) {
378 if(xmlnode_get_child(child, "composing")) { 383 if(xmlnode_get_child(child, "composing")) {
379 if(jm->chat_state == JM_STATE_ACTIVE) 384 if(jm->chat_state == JM_STATE_ACTIVE)
380 jm->chat_state = JM_STATE_COMPOSING; 385 jm->chat_state = JM_STATE_COMPOSING;