core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
This commit is contained in:
parent
2a40da1664
commit
005ec59a8a
1 changed files with 123 additions and 101 deletions
|
|
@ -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, error
|
||||
from twisted.internet import protocol
|
||||
from twisted.words.protocols.jabber import client, jid
|
||||
|
|
@ -86,7 +87,7 @@ class XEP_0163(object):
|
|||
item = pubsub.Item(payload=data)
|
||||
return self.host.plugins["XEP-0060"].publish(None, namespace, [item], profile_key=profile)
|
||||
|
||||
def sendPersonalEvent(self, event_type, data, profile_key='@DEFAULT@'):
|
||||
def sendPersonalEvent(self, event_type, data, profile_key=C.PROF_KEY_NONE):
|
||||
"""Send personal event after checking the data is alright
|
||||
@param event_type: type of event (eg: MOOD, TUNE), must be in self.pep_out_cb.keys()
|
||||
@param data: dict of {string:string} of event_type dependant data
|
||||
|
|
|
|||
Loading…
Reference in a new issue