Buddy Management¶
Buddy general interaction¶
Every time a client send a command to a buddy the command has to be inside an action tag.
Open gate example:
<message to="liam@domain" from="user@domain" id="1486028547270039399072925" type="chat">
<body />
<x xmlns="jabber:x:oob">
<action>cmd_open_gate</action>
<type>chat_text</type>
<payload/> // if a Json is required by the buddy put the right Json inside this tag
</x>
</message>
Buddy operation status message¶
Message format:
Tag |
Type |
Description |
|---|---|---|
x:action |
text |
One of the allowed types |
x:payload |
json object |
Represents message content |
payload:status |
int |
status code |
payload:response |
json object |
|
response:errorCode |
String |
error code |
response:errorMessage |
String |
buddy message |
Example:
<message to="test@domain" from="buddy@domain" id="1486028547270039399072925" type="chat">
<body />
<x xmlns="jabber:x:oob">
<action>operation_status</action>
<payload>
{
"status": -1,
"response": [
{
"errorCode": "xmpp_service_0",
"errorMessage": "Unaccepted version of client"
}]
}
</payload>
</x>
</message>