plugins XEP-0060, XEP-0313: implemented Order-By protoXEP:
new "order_by" key can be used in extra data, value can be, for now, "creation" or "modification".
This commit is contained in:
parent
677eebd553
commit
3e63d54e3d
1 changed files with 44 additions and 52 deletions
|
|
@ -162,6 +162,13 @@ class XEP_0313(object):
|
|||
if form_args:
|
||||
mam_args["form"] = mam.buildForm(**form_args)
|
||||
|
||||
# we only set orderBy if we have other MAM args
|
||||
# else we would make a MAM query while it's not expected
|
||||
if u"order_by" in extra and mam_args:
|
||||
order_by = extra.pop(u"order_by")
|
||||
assert isinstance(order_by, list)
|
||||
mam_args["orderBy"] = order_by
|
||||
|
||||
return mam.MAMRequest(**mam_args) if mam_args else None
|
||||
|
||||
def serialise(self, mam_response, data=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue