[Standards-JIG] ad-hoc commands questions
gaston at jivesoftware.com
Fri Oct 13 17:33:53 UTC 2006
Some time ago we implemented XEP-50 into Wildfire and we are now slowly
implementing XEP-133. While implementing XEP-133 (btw, I tend to keep
writing JEP instead of XEP :) ) I noticed two differences that I think are
not clear when reading XEP-50.
In XEP-50 commands are executed using IQ stanzas of type SET. The XEP does
not explicitly specify that they MUST be of a certain type but that is what
you infer from the examples. On the other hand XEP-133 is using IQ stanzas
of type GET to run commands (e.g. 4.7 Change User Password). It seems that
XEP-133 is using GET to "get" the form and "set" to finally execute the
command. I think that in order to make things simple I prefer the option of
just using SET instead of a mix of GET/SET. What do you think?
The other question is related to errors while executing commands. For
instance, how should the answer be when a supplied user JID does not exist
while trying to change a user password? XEP-50 is using the <note/> element
of type "error" to indicate that there was an error. But what type of IQ
packet should the be returned (i.e. "error" or "result")? BTW, example 23
in XEP-20 is using type SET while I guess the author wanted to use ERROR.
Answering to my last question and after reading section 4.4 Possible Errors
in XEP-50 I think that IQ packets should be of type ERROR and probably we
should use the condition <cmd:bad-payload/> for those cases. Is this
correct? May be adding a few examples of errors while executing commands in
XEP-50 and XEP-133 would help implementers to more easily understand.
Thanks for reading up to here. :)
More information about the Standards