Delayed delivery will always be set under the delay property of any data objects.
For more information please see XEP-0203.
... <delay xmlns="urn:xmpp:delay" stamp="2013-08-23T21:45:00Z" from="evilprofessor.co.uk"> Offline Storage </delay> ...
Will be turned into the following:
{ delay: { when: "2013-08-23T21:45:00Z", from: "evilprofessor.co.uk", reason: "Offline Storage" } }
The only required attribute is stamp meaning, at a minimum, only the when property may be present.
Should the need arise delayed delivery elements can also be build from JSON object by providing a delay property (where supported):
{ delay: { when: "2013-08-23T21:45:00Z", /* from: "evilprofessor.co.uk", */ /* reason: "Offline Storage" */ } }
This will be added to a stanza as follows:
... <delay xmlns="urn:xmpp:delay" stamp="2013-08-23T21:45:00Z" from="evilprofessor.co.uk"> Offline Storage </delay> ...