Fix retracting UserTune/UserActivity
This commit is contained in:
parent
bbf3a544e8
commit
31d6235881
|
@ -87,8 +87,10 @@ class UserActivity(AbstractPEPModule):
|
|||
return activity_dict or None
|
||||
|
||||
def _build_node(self, data):
|
||||
activity, subactivity, message = data
|
||||
item = nbxmpp.Node('activity', {'xmlns': self.namespace})
|
||||
if data is None:
|
||||
return
|
||||
activity, subactivity, message = data
|
||||
if activity:
|
||||
i = item.addChild(activity)
|
||||
if subactivity:
|
||||
|
|
|
@ -81,8 +81,10 @@ class UserTune(AbstractPEPModule):
|
|||
return tune_dict or None
|
||||
|
||||
def _build_node(self, data):
|
||||
artist, title, source, track, length = data
|
||||
item = nbxmpp.Node('tune', {'xmlns': nbxmpp.NS_TUNE})
|
||||
if data is None:
|
||||
return item
|
||||
artist, title, source, track, length = data
|
||||
if artist:
|
||||
item.addChild('artist', payload=artist)
|
||||
if title:
|
||||
|
|
Loading…
Reference in New Issue