| 123 xmlnode_set_namespace(command,"http://jabber.org/protocol/commands"); |
123 xmlnode_set_namespace(command,"http://jabber.org/protocol/commands"); |
| 124 xmlnode_set_attrib(command,"sessionid",actionInfo->sessionid); |
124 xmlnode_set_attrib(command,"sessionid",actionInfo->sessionid); |
| 125 xmlnode_set_attrib(command,"node",actionInfo->node); |
125 xmlnode_set_attrib(command,"node",actionInfo->node); |
| 126 |
126 |
| 127 /* cancel is handled differently on ad-hoc commands than regular forms */ |
127 /* cancel is handled differently on ad-hoc commands than regular forms */ |
| 128 if(!strcmp(xmlnode_get_namespace(result),"jabber:x:data") && !strcmp(xmlnode_get_attrib(result, "type"),"cancel")) { |
128 if (purple_strequal(xmlnode_get_namespace(result), "jabber:x:data") && |
| |
129 purple_strequal(xmlnode_get_attrib(result, "type"), "cancel")) { |
| 129 xmlnode_set_attrib(command,"action","cancel"); |
130 xmlnode_set_attrib(command,"action","cancel"); |
| 130 } else { |
131 } else { |
| 131 if(actionhandle) |
132 if(actionhandle) |
| 132 xmlnode_set_attrib(command,"action",actionhandle); |
133 xmlnode_set_attrib(command,"action",actionhandle); |
| 133 xmlnode_insert_child(command,result); |
134 xmlnode_insert_child(command,result); |