From 6ac7c9e5ae12e3e4ba910fb30df8ac87c6119b5f Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Thu, 7 Jan 2021 00:40:10 +0100 Subject: [PATCH] Support XEP-0333: Chat Markers Thanks to Tradelane Solutions GmbH for sponsoring this work. --- README.md | 1 + include/ns.hrl | 1 + include/xmpp_codec.hrl | 394 +++++++++++++++++++++-------------------- specs/xmpp_codec.spec | 27 +++ src/xep0333.erl | 195 ++++++++++++++++++++ src/xmpp_codec.erl | 40 +++-- 6 files changed, 454 insertions(+), 204 deletions(-) create mode 100644 src/xep0333.erl diff --git a/README.md b/README.md index 3f4498c..8a406b3 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,7 @@ XMPP elements from the following documents are supported: - [XEP-0313](https://xmpp.org/extensions/xep-0313.html): Message Archive Management - [XEP-0319](https://xmpp.org/extensions/xep-0319.html): Last User Interaction in Presence - [XEP-0328](https://xmpp.org/extensions/xep-0328.html): JID Prep +- [XEP-0333](https://xmpp.org/extensions/xep-0333.html): Chat Markers - [XEP-0334](https://xmpp.org/extensions/xep-0334.html): Message Processing Hints - [XEP-0352](https://xmpp.org/extensions/xep-0352.html): Client State Indication - [XEP-0355](https://xmpp.org/extensions/xep-0355.html): Namespace Delegation diff --git a/include/ns.hrl b/include/ns.hrl index 8581d01..dcf2b68 100644 --- a/include/ns.hrl +++ b/include/ns.hrl @@ -166,6 +166,7 @@ -define(NS_THUMBS_1, <<"urn:xmpp:thumbs:1">>). -define(NS_NICK, <<"http://jabber.org/protocol/nick">>). -define(NS_RECEIPTS, <<"urn:xmpp:receipts">>). +-define(NS_CHAT_MARKERS_0, <<"urn:xmpp:chat-markers:0">>). -define(NS_REPORTING_0, <<"urn:xmpp:reporting:0">>). -define(NS_REPORTING_REASON_ABUSE_0, <<"urn:xmpp:reporting:reason:abuse:0">>). -define(NS_REPORTING_REASON_SPAM_0, <<"urn:xmpp:reporting:reason:spam:0">>). diff --git a/include/xmpp_codec.hrl b/include/xmpp_codec.hrl index 6f218a7..afa5a64 100644 --- a/include/xmpp_codec.hrl +++ b/include/xmpp_codec.hrl @@ -138,6 +138,9 @@ data = <<>> :: binary()}). -type rsm_first() :: #rsm_first{}. +-record(mark_received, {id = <<>> :: binary()}). +-type mark_received() :: #mark_received{}. + -record(streamhost, {jid :: jid:jid(), host = <<>> :: binary(), port = 1080 :: non_neg_integer()}). @@ -146,6 +149,12 @@ -record(x509_challenge_failed, {}). -type x509_challenge_failed() :: #x509_challenge_failed{}. +-record(mark_displayed, {id = <<>> :: binary()}). +-type mark_displayed() :: #mark_displayed{}. + +-record(mark_acknowledged, {id = <<>> :: binary()}). +-type mark_acknowledged() :: #mark_acknowledged{}. + -record(carbons_enable, {}). -type carbons_enable() :: #carbons_enable{}. @@ -1196,221 +1205,224 @@ utc :: undefined | erlang:timestamp()}). -type time() :: #time{}. --type xmpp_element() :: address() | - addresses() | - adhoc_actions() | +-type xmpp_element() :: identity() | + jingle_ft_description() | + message() | + vcard_org() | adhoc_command() | - adhoc_note() | + xdata_option() | + ps_options() | + hint() | + forwarded() | + mix_client_leave() | + private() | + muc_subscription() | + x_conference() | + sasl_challenge() | + vcard_adr() | + sasl_abort() | + ps_subscription() | avatar_data() | - avatar_info() | - avatar_meta() | + streamhost() | + muc() | + delegated() | + privacy_item() | + jingle_ft_file() | + mam_result() | + oob_x() | + vcard_temp() | + upload_retry() | + stream_features() | + stat() | + x509_revoke() | + mix() | + delegation_query() | + muc_subscribe() | avatar_pointer() | - bind() | - block() | - block_item() | block_list() | - bob_data() | - bookmark_conference() | - bookmark_storage() | - bookmark_url() | + sasl_success() | + sic() | + upload_slot() | + media_uri() | + xevent() | + jingle() | + muc_subscriptions() | + search() | + credentials() | + presence() | + roster_item() | + iq() | + ibb_close() | + nick() | + legacy_auth() | + mix_setnick() | + block_item() | + roster_query() | + push_enable() | + handshake() | + ps_items() | + sasl_response() | + stream_start() | + x509_csr() | + push_disable() | + mam_query() | bytestreams() | - caps() | - carbons_disable() | - carbons_enable() | - carbons_private() | - carbons_received() | - carbons_sent() | - chatstate() | - compress() | - compress_failure() | + stanza_id() | + muc_actor() | + disco_item() | + search_item() | + receipt_request() | + muc_owner() | + rosterver_feature() | + sasl_auth() | + x509_ca_list() | + sm_enable() | + xdata_field() | compressed() | + mark_acknowledged() | + sasl_failure() | + 'see-other-host'() | + vcard_label() | + ps_publish() | + bind() | + mix_participant() | + privacy_list() | + x509_cert_chain() | + jidprep() | + last() | + jingle_ft_range() | + receipt_response() | + sm_enabled() | + privilege_perm() | + muc_user() | + message_thread() | + x509_register() | + adhoc_actions() | + db_verify() | + ps_affiliation() | compression() | - credentials() | - csi() | - db_feature() | + bookmark_url() | + redirect() | + stanza_error() | + ping() | + avatar_info() | + avatar_meta() | + hash_used() | + stream_error() | + sm_a() | + stat_error() | + carbons_private() | + xdata() | + idle() | + ps_subscribe() | + address() | + origin_id() | db_result() | - db_verify() | - delay() | - delegated() | - delegation() | - delegation_query() | - disco_info() | - disco_item() | - disco_items() | - expire() | - feature_csi() | feature_register() | - feature_sm() | - forwarded() | + unblock() | + jingle_ibb_transport() | + privilege() | + mam_fin() | + text() | + chatstate() | gone() | - handshake() | + muc_unsubscribe() | + jingle_s5b_candidate() | + vcard_xupdate() | + feature_sm() | + legacy_auth_feature() | + x509_challenge() | hash() | - hash_used() | - hint() | - ibb_close() | - ibb_data() | - ibb_open() | - identity() | - idle() | - iq() | - jidprep() | - jingle() | + services() | jingle_content() | - jingle_error() | + carbons_received() | jingle_ft_checksum() | - jingle_ft_description() | + sm_r() | + vcard_logo() | + muc_admin() | + rsm_first() | jingle_ft_error() | - jingle_ft_file() | - jingle_ft_range() | - jingle_ft_received() | - jingle_ibb_transport() | + service() | + sm_failed() | + x509_request() | + mix_leave() | + adhoc_note() | + delegation() | + mix_join() | + expire() | + ibb_data() | + carbons_sent() | + ps_unsubscribe() | + disco_items() | + time() | + vcard_photo() | + register() | jingle_reason() | - jingle_s5b_candidate() | - jingle_s5b_transport() | - last() | - legacy_auth() | - legacy_auth_feature() | - mam_archived() | - mam_fin() | - mam_prefs() | - mam_query() | - mam_result() | + compress() | + muc_unique() | media() | - media_uri() | - message() | - message_thread() | - mix() | + bookmark_conference() | + muc_destroy() | mix_client_join() | - mix_client_leave() | mix_create() | - mix_destroy() | - mix_join() | - mix_leave() | - mix_participant() | - mix_setnick() | - muc() | - muc_actor() | - muc_admin() | + ibb_open() | + mam_archived() | + db_feature() | + compress_failure() | + mark_displayed() | + sm_resumed() | + feature_csi() | + pubsub_owner() | muc_decline() | - muc_destroy() | - muc_history() | - muc_invite() | - muc_item() | - muc_owner() | - muc_subscribe() | - muc_subscription() | - muc_subscriptions() | - muc_unique() | - muc_unsubscribe() | - muc_user() | - nick() | - offline() | + starttls_failure() | + disco_info() | + thumbnail() | + bob_data() | + mark_received() | + sm_resume() | + vcard_tel() | + vcard_email() | + csi() | + starttls() | + mam_prefs() | + push_notification() | + stats() | + upload_file_too_large() | + xcaptcha() | offline_item() | - oob_x() | - origin_id() | - ping() | - presence() | - privacy_item() | - privacy_list() | - privacy_query() | - private() | - privilege() | - privilege_perm() | - ps_affiliation() | - ps_error() | - ps_event() | - ps_item() | - ps_items() | - ps_options() | - ps_publish() | ps_retract() | - ps_subscribe() | - ps_subscription() | - ps_unsubscribe() | + ps_item() | + mix_destroy() | pubsub() | - pubsub_owner() | - push_disable() | - push_enable() | - push_notification() | - receipt_request() | - receipt_response() | - redirect() | - register() | - report() | - roster_item() | - roster_query() | - rosterver_feature() | - rsm_first() | - rsm_set() | - sasl_abort() | - sasl_auth() | - sasl_challenge() | - sasl_failure() | + ps_error() | + muc_invite() | + bookmark_storage() | + vcard_key() | + muc_item() | sasl_mechanisms() | - sasl_response() | - sasl_success() | - search() | - search_item() | - 'see-other-host'() | - service() | - services() | + upload_slot_0() | + block() | + muc_history() | + privacy_query() | shim() | - sic() | - sm_a() | - sm_enable() | - sm_enabled() | - sm_failed() | - sm_r() | - sm_resume() | - sm_resumed() | - stanza_error() | - stanza_id() | - starttls() | - starttls_failure() | - starttls_proceed() | - stat() | - stat_error() | - stats() | - stream_error() | - stream_features() | - stream_start() | - streamhost() | - text() | - thumbnail() | - time() | - unblock() | - upload_file_too_large() | - upload_request() | + offline() | + delay() | + jingle_error() | upload_request_0() | - upload_retry() | - upload_slot() | - upload_slot_0() | - vcard_adr() | - vcard_email() | - vcard_geo() | - vcard_key() | - vcard_label() | - vcard_logo() | - vcard_name() | - vcard_org() | - vcard_photo() | - vcard_sound() | - vcard_tel() | - vcard_temp() | - vcard_xupdate() | + carbons_disable() | version() | - x509_ca_list() | - x509_cert_chain() | - x509_challenge() | + vcard_name() | + jingle_s5b_transport() | + carbons_enable() | + caps() | + report() | x509_challenge_failed() | - x509_csr() | - x509_register() | - x509_request() | - x509_revoke() | - x_conference() | - xcaptcha() | - xdata() | - xdata_field() | - xdata_option() | - xevent() | - xmpp_session(). + starttls_proceed() | + vcard_geo() | + xmpp_session() | + addresses() | + upload_request() | + jingle_ft_received() | + rsm_set() | + ps_event() | + vcard_sound(). diff --git a/specs/xmpp_codec.spec b/specs/xmpp_codec.spec index acb7610..b352c2b 100644 --- a/specs/xmpp_codec.spec +++ b/specs/xmpp_codec.spec @@ -3979,6 +3979,33 @@ result = {receipt_response, '$id'}, attrs = [#attr{name = <<"id">>}]}). +-xml(mark_markable, + #elem{name = <<"markable">>, + xmlns = <<"urn:xmpp:chat-markers:0">>, + module = 'xep0333', + result = true}). + +-xml(mark_received, + #elem{name = <<"received">>, + xmlns = <<"urn:xmpp:chat-markers:0">>, + module = 'xep0333', + result = {mark_received, '$id'}, + attrs = [#attr{name = <<"id">>, required = true}]}). + +-xml(mark_displayed, + #elem{name = <<"displayed">>, + xmlns = <<"urn:xmpp:chat-markers:0">>, + module = 'xep0333', + result = {mark_displayed, '$id'}, + attrs = [#attr{name = <<"id">>, required = true}]}). + +-xml(mark_acknowledged, + #elem{name = <<"acknowledged">>, + xmlns = <<"urn:xmpp:chat-markers:0">>, + module = 'xep0333', + result = {mark_acknowledged, '$id'}, + attrs = [#attr{name = <<"id">>, required = true}]}). + -xml(sic_ip, #elem{name = <<"ip">>, xmlns = [<<"urn:xmpp:sic:0">>, <<"urn:xmpp:sic:1">>], diff --git a/src/xep0333.erl b/src/xep0333.erl new file mode 100644 index 0000000..096d541 --- /dev/null +++ b/src/xep0333.erl @@ -0,0 +1,195 @@ +%% Created automatically by XML generator (fxml_gen.erl) +%% Source: xmpp_codec.spec + +-module(xep0333). + +-compile(export_all). + +do_decode(<<"acknowledged">>, + <<"urn:xmpp:chat-markers:0">>, El, Opts) -> + decode_mark_acknowledged(<<"urn:xmpp:chat-markers:0">>, + Opts, + El); +do_decode(<<"displayed">>, + <<"urn:xmpp:chat-markers:0">>, El, Opts) -> + decode_mark_displayed(<<"urn:xmpp:chat-markers:0">>, + Opts, + El); +do_decode(<<"received">>, <<"urn:xmpp:chat-markers:0">>, + El, Opts) -> + decode_mark_received(<<"urn:xmpp:chat-markers:0">>, + Opts, + El); +do_decode(<<"markable">>, <<"urn:xmpp:chat-markers:0">>, + El, Opts) -> + decode_mark_markable(<<"urn:xmpp:chat-markers:0">>, + Opts, + El); +do_decode(Name, <<>>, _, _) -> + erlang:error({xmpp_codec, {missing_tag_xmlns, Name}}); +do_decode(Name, XMLNS, _, _) -> + erlang:error({xmpp_codec, {unknown_tag, Name, XMLNS}}). + +tags() -> + [{<<"acknowledged">>, <<"urn:xmpp:chat-markers:0">>}, + {<<"displayed">>, <<"urn:xmpp:chat-markers:0">>}, + {<<"received">>, <<"urn:xmpp:chat-markers:0">>}, + {<<"markable">>, <<"urn:xmpp:chat-markers:0">>}]. + +do_encode({mark_received, _} = Received, TopXMLNS) -> + encode_mark_received(Received, TopXMLNS); +do_encode({mark_displayed, _} = Displayed, TopXMLNS) -> + encode_mark_displayed(Displayed, TopXMLNS); +do_encode({mark_acknowledged, _} = Acknowledged, + TopXMLNS) -> + encode_mark_acknowledged(Acknowledged, TopXMLNS). + +do_get_name({mark_acknowledged, _}) -> + <<"acknowledged">>; +do_get_name({mark_displayed, _}) -> <<"displayed">>; +do_get_name({mark_received, _}) -> <<"received">>. + +do_get_ns({mark_acknowledged, _}) -> + <<"urn:xmpp:chat-markers:0">>; +do_get_ns({mark_displayed, _}) -> + <<"urn:xmpp:chat-markers:0">>; +do_get_ns({mark_received, _}) -> + <<"urn:xmpp:chat-markers:0">>. + +pp(mark_received, 1) -> [id]; +pp(mark_displayed, 1) -> [id]; +pp(mark_acknowledged, 1) -> [id]; +pp(_, _) -> no. + +records() -> + [{mark_received, 1}, + {mark_displayed, 1}, + {mark_acknowledged, 1}]. + +decode_mark_acknowledged(__TopXMLNS, __Opts, + {xmlel, <<"acknowledged">>, _attrs, _els}) -> + Id = decode_mark_acknowledged_attrs(__TopXMLNS, + _attrs, + undefined), + {mark_acknowledged, Id}. + +decode_mark_acknowledged_attrs(__TopXMLNS, + [{<<"id">>, _val} | _attrs], _Id) -> + decode_mark_acknowledged_attrs(__TopXMLNS, + _attrs, + _val); +decode_mark_acknowledged_attrs(__TopXMLNS, [_ | _attrs], + Id) -> + decode_mark_acknowledged_attrs(__TopXMLNS, _attrs, Id); +decode_mark_acknowledged_attrs(__TopXMLNS, [], Id) -> + decode_mark_acknowledged_attr_id(__TopXMLNS, Id). + +encode_mark_acknowledged({mark_acknowledged, Id}, + __TopXMLNS) -> + __NewTopXMLNS = + xmpp_codec:choose_top_xmlns(<<"urn:xmpp:chat-markers:0">>, + [], + __TopXMLNS), + _els = [], + _attrs = encode_mark_acknowledged_attr_id(Id, + xmpp_codec:enc_xmlns_attrs(__NewTopXMLNS, + __TopXMLNS)), + {xmlel, <<"acknowledged">>, _attrs, _els}. + +decode_mark_acknowledged_attr_id(__TopXMLNS, + undefined) -> + erlang:error({xmpp_codec, + {missing_attr, + <<"id">>, + <<"acknowledged">>, + __TopXMLNS}}); +decode_mark_acknowledged_attr_id(__TopXMLNS, _val) -> + _val. + +encode_mark_acknowledged_attr_id(_val, _acc) -> + [{<<"id">>, _val} | _acc]. + +decode_mark_displayed(__TopXMLNS, __Opts, + {xmlel, <<"displayed">>, _attrs, _els}) -> + Id = decode_mark_displayed_attrs(__TopXMLNS, + _attrs, + undefined), + {mark_displayed, Id}. + +decode_mark_displayed_attrs(__TopXMLNS, + [{<<"id">>, _val} | _attrs], _Id) -> + decode_mark_displayed_attrs(__TopXMLNS, _attrs, _val); +decode_mark_displayed_attrs(__TopXMLNS, [_ | _attrs], + Id) -> + decode_mark_displayed_attrs(__TopXMLNS, _attrs, Id); +decode_mark_displayed_attrs(__TopXMLNS, [], Id) -> + decode_mark_displayed_attr_id(__TopXMLNS, Id). + +encode_mark_displayed({mark_displayed, Id}, + __TopXMLNS) -> + __NewTopXMLNS = + xmpp_codec:choose_top_xmlns(<<"urn:xmpp:chat-markers:0">>, + [], + __TopXMLNS), + _els = [], + _attrs = encode_mark_displayed_attr_id(Id, + xmpp_codec:enc_xmlns_attrs(__NewTopXMLNS, + __TopXMLNS)), + {xmlel, <<"displayed">>, _attrs, _els}. + +decode_mark_displayed_attr_id(__TopXMLNS, undefined) -> + erlang:error({xmpp_codec, + {missing_attr, <<"id">>, <<"displayed">>, __TopXMLNS}}); +decode_mark_displayed_attr_id(__TopXMLNS, _val) -> _val. + +encode_mark_displayed_attr_id(_val, _acc) -> + [{<<"id">>, _val} | _acc]. + +decode_mark_received(__TopXMLNS, __Opts, + {xmlel, <<"received">>, _attrs, _els}) -> + Id = decode_mark_received_attrs(__TopXMLNS, + _attrs, + undefined), + {mark_received, Id}. + +decode_mark_received_attrs(__TopXMLNS, + [{<<"id">>, _val} | _attrs], _Id) -> + decode_mark_received_attrs(__TopXMLNS, _attrs, _val); +decode_mark_received_attrs(__TopXMLNS, [_ | _attrs], + Id) -> + decode_mark_received_attrs(__TopXMLNS, _attrs, Id); +decode_mark_received_attrs(__TopXMLNS, [], Id) -> + decode_mark_received_attr_id(__TopXMLNS, Id). + +encode_mark_received({mark_received, Id}, __TopXMLNS) -> + __NewTopXMLNS = + xmpp_codec:choose_top_xmlns(<<"urn:xmpp:chat-markers:0">>, + [], + __TopXMLNS), + _els = [], + _attrs = encode_mark_received_attr_id(Id, + xmpp_codec:enc_xmlns_attrs(__NewTopXMLNS, + __TopXMLNS)), + {xmlel, <<"received">>, _attrs, _els}. + +decode_mark_received_attr_id(__TopXMLNS, undefined) -> + erlang:error({xmpp_codec, + {missing_attr, <<"id">>, <<"received">>, __TopXMLNS}}); +decode_mark_received_attr_id(__TopXMLNS, _val) -> _val. + +encode_mark_received_attr_id(_val, _acc) -> + [{<<"id">>, _val} | _acc]. + +decode_mark_markable(__TopXMLNS, __Opts, + {xmlel, <<"markable">>, _attrs, _els}) -> + true. + +encode_mark_markable(true, __TopXMLNS) -> + __NewTopXMLNS = + xmpp_codec:choose_top_xmlns(<<"urn:xmpp:chat-markers:0">>, + [], + __TopXMLNS), + _els = [], + _attrs = xmpp_codec:enc_xmlns_attrs(__NewTopXMLNS, + __TopXMLNS), + {xmlel, <<"markable">>, _attrs, _els}. diff --git a/src/xmpp_codec.erl b/src/xmpp_codec.erl index cd99e79..141b404 100644 --- a/src/xmpp_codec.erl +++ b/src/xmpp_codec.erl @@ -27,7 +27,6 @@ encode(El, TopXMLNS) -> Mod = get_mod(El), Mod:do_encode(El, TopXMLNS). - get_name(El) -> Mod = get_mod(El), Mod:do_get_name(El). @@ -520,6 +519,9 @@ get_mod(<<"item">>, <<"http://jabber.org/protocol/muc#user">>) -> xep0045; get_mod(<<"x">>, <<"jabber:x:oob">>) -> xep0066; +get_mod(<<"displayed">>, + <<"urn:xmpp:chat-markers:0">>) -> + xep0333; get_mod(<<"delegate">>, <<"urn:xmpp:delegation:1">>) -> xep0355; get_mod(<<"priority">>, <<"jabber:client">>) -> rfc6120; @@ -550,6 +552,9 @@ get_mod(<<"processing-failed">>, get_mod(<<"address">>, <<"http://jabber.org/protocol/address">>) -> xep0033; +get_mod(<<"acknowledged">>, + <<"urn:xmpp:chat-markers:0">>) -> + xep0333; get_mod(<<"unsupported-transports">>, <<"urn:xmpp:jingle:1">>) -> xep0166; @@ -927,18 +932,7 @@ get_mod(<<"hash-used">>, <<"urn:xmpp:hashes:2">>) -> get_mod(<<"presence">>, <<"jabber:component:accept">>) -> rfc6120; -get_mod(<<"abort">>, - <<"urn:ietf:params:xml:ns:xmpp-sasl">>) -> - rfc6120; -get_mod(<<"FAMILY">>, <<"vcard-temp">>) -> xep0054; get_mod(<<"URL">>, <<"vcard-temp">>) -> xep0054; -get_mod(<<"headers">>, - <<"http://jabber.org/protocol/shim">>) -> - xep0131; -get_mod(<<"flip-page">>, <<"urn:xmpp:mam:2">>) -> - xep0313; -get_mod(<<"received">>, <<"urn:xmpp:receipts">>) -> - xep0184; get_mod(<<"jid-malformed">>, <<"urn:ietf:params:xml:ns:xmpp-stanzas">>) -> rfc6120; @@ -1003,6 +997,9 @@ get_mod(<<"precondition-not-met">>, get_mod(<<"item">>, <<"http://jabber.org/protocol/offline">>) -> xep0013; +get_mod(<<"received">>, + <<"urn:xmpp:chat-markers:0">>) -> + xep0333; get_mod(<<"get">>, <<"urn:xmpp:http:upload">>) -> xep0363; get_mod(<<"query">>, @@ -1495,6 +1492,9 @@ get_mod(<<"unsupported-feature">>, rfc6120; get_mod(<<"request">>, <<"urn:xmpp:receipts">>) -> xep0184; +get_mod(<<"markable">>, + <<"urn:xmpp:chat-markers:0">>) -> + xep0333; get_mod(<<"url">>, <<"storage:bookmarks">>) -> xep0048; get_mod(<<"unexpected-request">>, <<"urn:ietf:params:xml:ns:xmpp-stanzas">>) -> @@ -1568,6 +1568,17 @@ get_mod(<<"db:verify">>, <<"jabber:server">>) -> get_mod(<<"security-error">>, <<"urn:xmpp:jingle:1">>) -> xep0166; +get_mod(<<"abort">>, + <<"urn:ietf:params:xml:ns:xmpp-sasl">>) -> + rfc6120; +get_mod(<<"FAMILY">>, <<"vcard-temp">>) -> xep0054; +get_mod(<<"headers">>, + <<"http://jabber.org/protocol/shim">>) -> + xep0131; +get_mod(<<"flip-page">>, <<"urn:xmpp:mam:2">>) -> + xep0313; +get_mod(<<"received">>, <<"urn:xmpp:receipts">>) -> + xep0184; get_mod(Name, XMLNS) -> xmpp_codec_external:lookup(Name, XMLNS). @@ -1610,7 +1621,6 @@ get_mod({xdata_option, _, _}) -> xep0004; get_mod({x509_cert_chain, _, _}) -> xep0417; get_mod({vcard_geo, _, _}) -> xep0054; get_mod({xevent, _, _, _, _, _}) -> xep0022; -get_mod({db_result, _, _, _, _, _}) -> xep0220; get_mod({jingle_content, _, _, _, _, _}) -> xep0166; get_mod({bookmark_conference, _, _, _, _, _}) -> xep0048; @@ -1807,6 +1817,9 @@ get_mod({identity, _, _, _, _}) -> xep0030; get_mod({redirect, _}) -> rfc6120; get_mod({muc_history, _, _, _, _}) -> xep0045; get_mod({muc_owner, _, _, _}) -> xep0045; +get_mod({mark_received, _}) -> xep0333; +get_mod({mark_displayed, _}) -> xep0333; +get_mod({mark_acknowledged, _}) -> xep0333; get_mod({jingle_ft_file, _, _, _, _, _, _, _, _}) -> xep0234; get_mod({bookmark_url, _, _}) -> xep0048; @@ -1902,4 +1915,5 @@ get_mod({ps_unsubscribe, _, _, _}) -> xep0060; get_mod({sm_resume, _, _, _}) -> xep0198; get_mod({push_enable, _, _, _}) -> xep0357; get_mod({jingle_ft_range, _, _, _}) -> xep0234; +get_mod({db_result, _, _, _, _, _}) -> xep0220; get_mod(Record) -> xmpp_codec_external:lookup(Record).