[tmolitor] use uuid instead of plain counting integers for stanza ids. Fixes #8202
This commit is contained in:
parent
eb30ad07bd
commit
7c9a5aa429
|
@ -32,6 +32,7 @@ import os
|
||||||
import logging
|
import logging
|
||||||
import locale
|
import locale
|
||||||
import gi
|
import gi
|
||||||
|
import uuid
|
||||||
|
|
||||||
from common import config
|
from common import config
|
||||||
import nbxmpp
|
import nbxmpp
|
||||||
|
@ -239,11 +240,8 @@ gajim_optional_features = {}
|
||||||
# Capabilities hash per account
|
# Capabilities hash per account
|
||||||
caps_hash = {}
|
caps_hash = {}
|
||||||
|
|
||||||
global_id = 0
|
|
||||||
def get_an_id():
|
def get_an_id():
|
||||||
global global_id
|
return str(uuid.uuid4())
|
||||||
global_id += 1
|
|
||||||
return global_id
|
|
||||||
|
|
||||||
def get_nick_from_jid(jid):
|
def get_nick_from_jid(jid):
|
||||||
pos = jid.find('@')
|
pos = jid.find('@')
|
||||||
|
|
Loading…
Reference in New Issue