From e5750b368e1c158a610cea95c541b3f64bdee4b0 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 4 Jan 2013 00:25:46 -0800 Subject: [PATCH] Fix setting publish options for pubsub storage. --- sleekxmpp/plugins/xep_0222.py | 5 +++-- sleekxmpp/plugins/xep_0223.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sleekxmpp/plugins/xep_0222.py b/sleekxmpp/plugins/xep_0222.py index 1073c1a1..2cc7f703 100644 --- a/sleekxmpp/plugins/xep_0222.py +++ b/sleekxmpp/plugins/xep_0222.py @@ -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, diff --git a/sleekxmpp/plugins/xep_0223.py b/sleekxmpp/plugins/xep_0223.py index ab99f277..abbecfc7 100644 --- a/sleekxmpp/plugins/xep_0223.py +++ b/sleekxmpp/plugins/xep_0223.py @@ -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,