comparison src/plugins/plugin_xep_0277.py @ 310:53adec87d1d7

plugin group blog: group blog subscription
author Goffi <goffi@goffi.org>
date Mon, 11 Apr 2011 12:47:35 +0200
parents f1a3db8ee04a
children 0aa6ca6cdbdd
comparison
equal deleted inserted replaced
309:f1a3db8ee04a 310:53adec87d1d7
31 from feed.atom import Entry, Author 31 from feed.atom import Entry, Author
32 import uuid 32 import uuid
33 from time import time 33 from time import time
34 34
35 NS_MICROBLOG = 'urn:xmpp:microblog:0' 35 NS_MICROBLOG = 'urn:xmpp:microblog:0'
36 NS_ACCESS_MODEL = 'pubsub#access_model' 36 OPT_ACCESS_MODEL = 'pubsub#access_model'
37 NS_PERSIST_ITEMS = 'pubsub#persist_items' 37 OPT_PERSIST_ITEMS = 'pubsub#persist_items'
38 NS_MAX_ITEMS = 'pubsub#max_items' 38 OPT_MAX_ITEMS = 'pubsub#max_items'
39 39
40 PLUGIN_INFO = { 40 PLUGIN_INFO = {
41 "name": "Microblogging over XMPP Plugin", 41 "name": "Microblogging over XMPP Plugin",
42 "import_name": "XEP-0277", 42 "import_name": "XEP-0277",
43 "type": "XEP", 43 "type": "XEP",
157 If the node already exists, it change options 157 If the node already exists, it change options
158 @param access: Node access model, according to xep-0060 #4.5 158 @param access: Node access model, according to xep-0060 #4.5
159 @param profile_key: profile key""" 159 @param profile_key: profile key"""
160 160
161 _jid, xmlstream = self.host.getJidNStream(profile_key) 161 _jid, xmlstream = self.host.getJidNStream(profile_key)
162 _options = {NS_ACCESS_MODEL:access, NS_PERSIST_ITEMS:1, NS_MAX_ITEMS:-1} 162 _options = {OPT_ACCESS_MODEL:access, OPT_PERSIST_ITEMS:1, OPT_MAX_ITEMS:-1}
163 def cb(result): 163 def cb(result):
164 #Node is created with right permission 164 #Node is created with right permission
165 debug(_("Microblog node has now access %s") % access) 165 debug(_("Microblog node has now access %s") % access)
166 166
167 def fatal_err(s_error): 167 def fatal_err(s_error):