Commit 91661540 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Replace deprecated methods

parent 46ac9536
......@@ -70,7 +70,7 @@ class Activity(BaseModule):
activity = name
subactivity = self._parse_sub_activity(child)
if activity is None and activity_node.getPayload():
if activity is None and activity_node.getChildren():
self._log.warning('No valid activity value found')
raise NodeProcessed
......@@ -49,12 +49,12 @@ class AdHoc(BaseModule):
if response.isError():
raise StanzaError(response)
payload = response.getQueryPayload()
if payload is None:
raise MalformedStanzaError('query payload missing', response)
children = response.getQueryChildren()
if not children:
raise MalformedStanzaError('query children missing', response)
command_list = []
for item in payload:
for item in children:
if item.getName() != 'item':
......@@ -68,7 +68,7 @@ class Mood(BaseModule):
elif name in MOODS:
mood = name
if mood is None and mood_node.getPayload():
if mood is None and mood_node.getChildren():
self._log.warning('No valid mood value found')
raise NodeProcessed
......@@ -437,9 +437,9 @@ class MUC(BaseModule):
raise StanzaError(response)
jid = response.getFrom()
payload = response.getQueryPayload()
children = response.getQueryChildren()
for form in payload:
for form in children:
if form.getNamespace() == Namespace.DATA:
dataform = extend_form(node=form)'Config form received for %s', jid)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment