Revision 613065363635 () - Diff

Link to this snippet: https://friendpaste.com/3C3JbrHvNfHDdRUZ38aMZG
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Imagine this one script

"""
<iq type='set' to= 'roomname@conference.chat.oonair.net' id='id1'>
<oo xmlns='http://oonair.com/muc#share'>
<item name='Falda tubo' thumbnail='http://webpage.info/falda_tn.jpg' id='itemid1' action='add' url='http://webpage.info/falda.html’>
<metadata path=' ' />
</item>
</oo>
</iq>
"""
class Item(ElementBase):
name = 'item'
namespace = 'http://oonair.com/muc#share'
plugin_attrib = 'item'
interfaces = set(('name', 'thumbnail', 'id', 'action', 'url', 'metadata'))
sub_interfaces = set(('metadata'))

class OO(ElementBase):
name = 'oo'
namespace = 'http://oonair.com/muc#share'
plugin_attrib = 'oo_muc_share'
interfaces = set(('item'))
sub_interfaces = interfaces
subitem = (Item,)
# And this one will be going in the xmpp client script
register_stanza_plugin(Iq, OO, Item, iterable = True)