diff src/plugins/plugin_xep_0277.py @ 916:1a759096ccbd

core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 16:27:09 +0100
parents 64ec04991d9d
children 301b342c697a
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py	Fri Mar 21 16:19:46 2014 +0100
+++ b/src/plugins/plugin_xep_0277.py	Fri Mar 21 16:27:09 2014 +0100
@@ -18,6 +18,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 from sat.core.i18n import _
+from sat.core.constants import Const as C
 from logging import debug, info, warning, error
 from twisted.words.protocols.jabber import jid
 from twisted.internet import defer
@@ -309,7 +310,7 @@
         ret = yield self.host.plugins["XEP-0060"].publish(None, NS_MICROBLOG, [item], profile_key=profile)
         defer.returnValue(ret)
 
-    def getLastMicroblogs(self, pub_jid, max_items=10, profile_key='@DEFAULT@'):
+    def getLastMicroblogs(self, pub_jid, max_items=10, profile_key=C.PROF_KEY_NONE):
         """Get the last published microblogs
         @param pub_jid: jid of the publisher
         @param max_items: how many microblogs we want to get
@@ -329,7 +330,7 @@
         d.addCallback(resultToArray)
         return d
 
-    def setMicroblogAccess(self, access="presence", profile_key='@DEFAULT@'):
+    def setMicroblogAccess(self, access="presence", profile_key=C.PROF_KEY_NONE):
         """Create a microblog node on PEP with given access
         If the node already exists, it change options
         @param access: Node access model, according to xep-0060 #4.5