Merge pull request #223 from anton-ryzhov/resource_generation
Fixed resource generation via uuid
This commit is contained in:
commit
8c763fcf43
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
|||
See the file LICENSE for copying permission.
|
||||
"""
|
||||
|
||||
import uuid
|
||||
import logging
|
||||
import hashlib
|
||||
import random
|
||||
|
@ -98,7 +99,7 @@ class XEP_0078(BasePlugin):
|
|||
# A resource is required, so create a random one if necessary
|
||||
resource = self.xmpp.requested_jid.resource
|
||||
if not resource:
|
||||
resource = uuid.uuid4()
|
||||
resource = str(uuid.uuid4())
|
||||
|
||||
iq['auth']['resource'] = resource
|
||||
|
||||
|
|
Loading…
Reference in a new issue