Commit 7970e23c authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Add VCard4 (XEP-0292) support

parent f8f99f33
......@@ -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:
......
......@@ -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)
This diff is collapsed.
......@@ -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'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment