comparison src/plugins/plugin_misc_radiocol.py @ 536:a31abb97310d

core, plugins: fixed bad namespace in stanza creation
author Goffi <goffi@goffi.org>
date Thu, 01 Nov 2012 22:41:39 +0100
parents 2a072735e459
children ca13633d3b6b
comparison
equal deleted inserted replaced
535:790be337cc41 536:a31abb97310d
78 host.bridge.addSignal("radiocolUploadOk", ".plugin", signature='ss') #room_jid, profile 78 host.bridge.addSignal("radiocolUploadOk", ".plugin", signature='ss') #room_jid, profile
79 host.trigger.add("MUC user joined", self.userJoinedTrigger) 79 host.trigger.add("MUC user joined", self.userJoinedTrigger)
80 80
81 def createRadiocolElt(self, to_jid, type="normal"): 81 def createRadiocolElt(self, to_jid, type="normal"):
82 type = "normal" if to_jid.resource else "groupchat" 82 type = "normal" if to_jid.resource else "groupchat"
83 elt = domish.Element(('jabber:client','message')) 83 elt = domish.Element((None,'message'))
84 elt["to"] = to_jid.full() 84 elt["to"] = to_jid.full()
85 elt["type"] = type 85 elt["type"] = type
86 elt.addElement((NC_RADIOCOL, RADIOC_TAG)) 86 elt.addElement((NC_RADIOCOL, RADIOC_TAG))
87 return elt 87 return elt
88 88
89 def __create_started_elt(self): 89 def __create_started_elt(self):
90 """Create a game_started domish element""" 90 """Create a game_started domish element"""
91 started_elt = domish.Element(('','started')) 91 started_elt = domish.Element((None,'started'))
92 return started_elt 92 return started_elt
93 93
94 def __create_preload_elt(self, sender, filename, title, artist, album): 94 def __create_preload_elt(self, sender, filename, title, artist, album):
95 preload_elt = domish.Element(('','preload')) 95 preload_elt = domish.Element((None,'preload'))
96 preload_elt['sender'] = sender 96 preload_elt['sender'] = sender
97 preload_elt['filename'] = filename #XXX: the frontend should know the temporary directory where file is put 97 preload_elt['filename'] = filename #XXX: the frontend should know the temporary directory where file is put
98 preload_elt['title'] = title 98 preload_elt['title'] = title
99 preload_elt['artist'] = artist 99 preload_elt['artist'] = artist
100 preload_elt['album'] = album 100 preload_elt['album'] = album