diff src/plugins/plugin_xep_0249.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 f3513c8cc2e6
children 75f3b3b430ff
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0249.py	Fri Mar 21 16:19:46 2014 +0100
+++ b/src/plugins/plugin_xep_0249.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.xish import domish
 from twisted.internet import protocol, defer
@@ -82,7 +83,7 @@
     def getHandler(self, profile):
         return XEP_0249_handler(self)
 
-    def invite(self, target, room, options={}, profile_key='@DEFAULT@'):
+    def invite(self, target, room, options={}, profile_key=C.PROF_KEY_NONE):
         """
         Invite a user to a room
         @param target: jid of the user to invite
@@ -102,7 +103,7 @@
             x_elt[opt] = options[opt]
         self.host.profiles[profile].xmlstream.send(message)
 
-    def _invite(self, target, service, roomId, options={}, profile_key='@DEFAULT@'):
+    def _invite(self, target, service, roomId, options={}, profile_key=C.PROF_KEY_NONE):
         """
         Invite an user to a room
         @param target: jid of the user to invite
@@ -113,7 +114,7 @@
         #TODO: check parameters validity
         self.invite(jid.JID(target), jid.JID("%s@%s" % (roomId, service)), options, profile_key)
 
-    def _accept(self, room, profile_key='@DEFAULT@'):
+    def _accept(self, room, profile_key=C.PROF_KEY_NONE):
         """
         Accept the invitation to join a MUC
         @param room: room jid as string