Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Brötzmann
python-nbxmpp
Commits
7970e23c
Commit
7970e23c
authored
Sep 27, 2020
by
Philipp Hörist
Browse files
Add VCard4 (XEP-0292) support
parent
f8f99f33
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
nbxmpp/dispatcher.py
View file @
7970e23c
...
...
@@ -76,6 +76,7 @@ from nbxmpp.modules.register import Register
from
nbxmpp.modules.http_upload
import
HTTPUpload
from
nbxmpp.modules.mam
import
MAM
from
nbxmpp.modules.vcard_temp
import
VCardTemp
from
nbxmpp.modules.vcard4
import
VCard4
from
nbxmpp.modules.misc
import
unwrap_carbon
from
nbxmpp.modules.misc
import
unwrap_mam
from
nbxmpp.structs
import
StanzaTimeoutError
...
...
@@ -182,6 +183,7 @@ class StanzaDispatcher(Observable):
self
.
_modules
[
'HTTPUpload'
]
=
HTTPUpload
(
self
.
_client
)
self
.
_modules
[
'MAM'
]
=
MAM
(
self
.
_client
)
self
.
_modules
[
'VCardTemp'
]
=
VCardTemp
(
self
.
_client
)
self
.
_modules
[
'VCard4'
]
=
VCard4
(
self
.
_client
)
for
instance
in
self
.
_modules
.
values
():
for
handler
in
instance
.
handlers
:
...
...
nbxmpp/modules/base.py
View file @
7970e23c
...
...
@@ -31,7 +31,7 @@ class BaseModule:
def
__getattr__
(
self
,
name
):
if
name
not
in
self
.
_depends
:
raise
AttributeError
raise
AttributeError
(
'Unknown method: %s'
%
name
)
module
=
self
.
_client
.
get_module
(
self
.
_depends
[
name
])
return
getattr
(
module
,
name
)
nbxmpp/modules/vcard4.py
0 → 100644
View file @
7970e23c
This diff is collapsed.
Click to expand it.
nbxmpp/namespaces.py
View file @
7970e23c
...
...
@@ -154,6 +154,8 @@ class _Namespaces:
VCARD
:
str
=
'vcard-temp'
VCARD_UPDATE
:
str
=
'vcard-temp:x:update'
VCARD_CONVERSION
:
str
=
'urn:xmpp:pep-vcard-conversion:0'
VCARD4
:
str
=
'urn:ietf:params:xml:ns:vcard-4.0'
VCARD4_PUBSUB
:
str
=
'urn:xmpp:vcard4'
VERSION
:
str
=
'jabber:iq:version'
XHTML_IM
:
str
=
'http://jabber.org/protocol/xhtml-im'
XHTML
:
str
=
'http://www.w3.org/1999/xhtml'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment