Fix setting publish options for pubsub storage.

This commit is contained in:
Lance Stout 2013-01-04 00:25:46 -08:00
parent 2c04ae084c
commit e5750b368e
2 changed files with 6 additions and 4 deletions

View file

@ -76,10 +76,11 @@ class XEP_0222(BasePlugin):
ftype='hidden',
value='http://jabber.org/protocol/pubsub#publish-options')
fields = options['fields']
for field, value in self.profile.items():
if field not in options.fields:
if field not in fields:
options.add_field(var=field)
options.fields[field]['value'] = value
options['fields'][field]['value'] = value
return self.xmpp['xep_0163'].publish(stanza, node,
options=options,

View file

@ -76,10 +76,11 @@ class XEP_0223(BasePlugin):
ftype='hidden',
value='http://jabber.org/protocol/pubsub#publish-options')
fields = options['fields']
for field, value in self.profile.items():
if field not in options.fields:
if field not in fields:
options.add_field(var=field)
options.fields[field]['value'] = value
options['fields'][field]['value'] = value
return self.xmpp['xep_0163'].publish(stanza, node,
options=options,