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, warning
|
||||
from twisted.words.xish import domish
|
||||
from twisted.words.protocols.jabber import client, jid, xmlstream
|
||||
|
|
@ -116,7 +117,7 @@ class XEP_0115(object):
|
|||
presenceInst._legacy_send = presenceInst.send
|
||||
presenceInst.send = new_send
|
||||
|
||||
def generateHash(self, profile_key="@DEFAULT@"):
|
||||
def generateHash(self, profile_key=C.PROF_KEY_NONE):
|
||||
"""This method generate a sha1 hash as explained in xep-0115 #5.1
|
||||
it then store it in XEP_0115.cap_hash"""
|
||||
profile = self.host.memory.getProfileName(profile_key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue