def setup(self, xml=None): ElementBase.setup(self, xml) self._form = xep_0004.stanza.Form() self._form['type'] = 'submit' field = self._form.add_field(var='FORM_TYPE', ftype='hidden', value='urn:xmpp:mam:2') self.append(self._form) self._results = []
def setup(self, xml: Optional[ET.ElementTree] = None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches item information. :param xml: Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._items = {item[0:2] for item in self['items']}
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches item information. Arguments: xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._datas = {data['name'] for data in self['datas']}
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches item information. Arguments: xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._timestamps = {ts['value'] for ts in self['timestamps']}
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches item information. Arguments: xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._items = set([item[0:2] for item in self['items']])
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches item information. Arguments: xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._nodes = {node['nodeId'] for node in self['nodes']} self._fields = {field['name'] for field in self['fields']}
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches identity and feature information. :param xml: Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._identities = {id[0:3] for id in self['identities']} self._features = self['features']
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup Caches identity and feature information. Arguments: xml -- Use an existing XML object for the stanza's values. """ ElementBase.setup(self, xml) self._identities = set([id[0:3] for id in self['identities']]) self._features = self['features']
def setup(self, xml=None): """ Populate the stanza object using an optional XML object. Overrides ElementBase.setup. Sets a default error type and condition, and changes the parent stanza's type to 'error'. Arguments: xml -- Use an existing XML object for the stanza's values. """ if ElementBase.setup(self, xml): #If we had to generate XML then set default values. self['type'] = 'cancel' self['condition'] = 'feature-not-implemented' if self.parent is not None: self.parent()['type'] = 'error'
def setup(self, xml=None): if ElementBase.setup(self, xml): self._type = None else: self._type = self['type']
def setup(self, xml=None): if ElementBase.setup(self, xml): # If we had to generate xml self['type'] = 'form'
def setup(self, xml=None): ElementBase.setup(self, xml) self._results = []
def setup(self, xml=None): ElementBase.setup(self, xml) self._results: List[Message] = []