Differences between revisions 1 and 2
Revision 1 as of 2022-350 18:02:28
Size: 1718
Editor: Singpolyma
Comment: early draft
Revision 2 as of 2022-351 17:02:58
Size: 1767
Editor: bras-base-ktnron060cw-grc-05-184-144-81-134
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
# Registration = Registration
Line 11: Line 11:
# Command Payloads = Command Payloads
Line 16: Line 16:
    A command MAY contain zero or more <note/> elements and MAY contain other namespaced elements as payload. Elements qualified by the "jabber:x:data" and "jabber:x:oob" namespaces are the typical payload. A command MAY contain zero or more <note/> elements and MAY contain other namespaced elements as payload. Elements qualified by the "jabber:x:data" and "jabber:x:oob" namespaces are the typical payload.
Line 18: Line 18:
    The children of a <command/> element (other than <actions/> and <note/>) pertain to the command's execution. The order of these elements denote their precedence, so that those The order of these elements denote their precedence, so that those
Line 22: Line 22:
So each step of the flow can be defined by one or more elements, to allow clients with different abilities to render what works for the, for example this is common: So each step of the flow can be defined by one or more elements, to allow clients with different abilities to render what works for them, for example:
Line 26: Line 26:
  <x xmlns="jabber:x:oob">
    <url>scheme:some-uri</url>
    <desc>This is what's up here...</desc>
  </x>
  <note type="info">This is what's up here: scheme:some-uri</note>

One of the areas where Cheogram Android seeks to forge ahead is to provide high-quality mobile-first UI for services that operate of the Jabber network.

Registration

Many kinds of services require a registration or login flow. These are all covered by XEP-0077 so if you need this feature your service should implement that.

You may find that sometimes your flow needs more than the one-form-one-step model that XEP-0077 supports. In this case it is recommended to also have a XEP-0050 command with node of `jabber:iq:register`. The response from a XEP-0077 registration attempt by a new user thus becomes only a reply with instructions to use the command instead. Sensible clients can detect this situation and work it to their UI accordingly.

XEP-0077 remains important for use cases where a user checks if they are still registered or removed their registration.

Command Payloads

Most service interaction with a user happens over XEP-0050 and family.

A command MAY contain zero or more <note/> elements and MAY contain other namespaced elements as payload. Elements qualified by the "jabber:x:data" and "jabber:x:oob" namespaces are the typical payload.

The order of these elements denote their precedence, so that those 
elements earlier in the list have higher precedence.

So each step of the flow can be defined by one or more elements, to allow clients with different abilities to render what works for them, for example:

<command xmlns='http://jabber.org/protocol/commands' node='doit' status='excecuting'>
  <x xmlns="jabber:x:oob">
    <url>scheme:some-uri</url>
    <desc>This is what's up here...</desc>
  </x>
  <note type="info">This is what's up here: scheme:some-uri</note>
</command>

CheogramApp/CommandUI (last edited 2023-287 23:46:15 by Singpolyma)