tmp (wokkel/mam): restore MAMPrefs being callable without argument when constructing a query:
- change occured in revision 1770 (f525c272fd6d)
This commit is contained in:
parent
27f74af7b0
commit
e2a807bdbc
1 changed files with 6 additions and 4 deletions
|
|
@ -88,10 +88,10 @@ class MAMRequest(object):
|
|||
@itype rsm: L{rsm.RSMRequest}
|
||||
|
||||
@ivar node: pubsub node id if querying a pubsub node, else None.
|
||||
@itype form: C{unicode}
|
||||
@itype node: C{unicode}
|
||||
|
||||
@ivar query_id: id to use to track the query
|
||||
@itype form: C{unicode}
|
||||
@itype query_id: C{unicode}
|
||||
"""
|
||||
# FIXME: should be based on generic.Stanza
|
||||
|
||||
|
|
@ -178,8 +178,10 @@ class MAMPrefs(object):
|
|||
@type never: C{list}
|
||||
"""
|
||||
|
||||
def __init__(self, default, always=None, never=None):
|
||||
assert default in ('always', 'never', 'roster')
|
||||
def __init__(self, default=None, always=None, never=None):
|
||||
if default is not None:
|
||||
# default must be defined in response, but can be empty in request (see http://xmpp.org/extensions/xep-0313.html#config)
|
||||
assert default in ('always', 'never', 'roster')
|
||||
self.default = default
|
||||
if always is not None:
|
||||
assert isinstance(always, list)
|
||||
|
|
|
|||
Loading…
Reference in a new issue