Skip to content

Commit

Permalink
Merge branch 'master' into mam-disco-barejid-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JanuszJakubiec authored Jan 3, 2024
2 parents b9ca511 + 112e3a6 commit 149963a
Show file tree
Hide file tree
Showing 90 changed files with 1,941 additions and 1,043 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
# [MongooseIM 6.2.0](https://github.com/esl/MongooseIM/releases/tag/6.2.0) - 2023-12-13

## Highlights

- Introduced CETS as an alternative internal database to Mnesia
- Updated many XEP implementations to the newest version
- Implemented partial support for XEP-0386: Bind 2 and XEP-0388: Extensible SASL Profile
- Support for Erlang 26
- Removed support for Riak
- Various improvements and fixes

## Added

- CETS
- CETS backend for session management and stream management (#3629, #4075, #4143)
- Add GraphQL handler for CETS info (#4015, #4116)
- RDBMS discovery backend for CETS (#4022, #4042, #4108, #4049, #4165, #4182)
- CETS backend for `mod_bosh` (#4050)
- CETS support for components (#4047)
- CETS support for S2S (#4046)
- CETS backend for `mod_muc` (#4066)
- CETS backend for `mod_jingle_sip` (#4076)
- CETS backend for `mongoose_cluster_id` (#4136)
- Add CETS backend for `mod_keystore` (#4140)
- Remove mnesia from `mod_register` (#4146)
- Anonymous auth supports mnesia and CETS backends (#4148)
- Custom EPMD module (#4179)
- Unified XEP list for xmpp.org (#4021, #4024, #4025, #4123)
- Reporting to Google Analytics 4 (#4040, #4061)
- Add config option to limit the number of users per domain (#4059)
- XEP-0386: Bind 2 and XEP-0388: Extensible SASL Profile
- Extensible SASL Profile (#4101, #4102)
- Bind 2 (#4113, #4114)
- Log internal-server-errors in `mod_privacy` (#4139)

## Changed

- XEP updates
- Implement XEP-0004: Data Forms in a separate module (#4028, #4031)
- Update XEP-0016: Privacy Lists (#4038)
- Update XEP-0030: Service Discovery (#4039)
- Update XEP-0050: Ad-Hoc Commands (#4043, #4048)
- Update XEP-0363: HTTP File Upload(#4053)
- Update attributes for XEP-0178 and add for XEP-0220 (#4057)
- Update XEP-0045: Multi-User Chat (#4054)
- Update XEPs: XEP-0082, XEP-0115, XEP-0124, XEP-0157, XEP-0160, XEP-0163, XEP-0199, XEP-0248, XEP-0277 (#4060)
- Update XEP-0280 (#4083)
- Update XEP-0060: Publish-Subscribe (#4092)
- Update XEP-0215: External Service Discovery (#4120)
- Advertise support for XEP-0249: Direct MUC Invitations (#4168)
- Upgrade segmented_cache library and its telemetry events (#4041)
- Improved Metrics initialization (#4070)
- Initialise domain workers in the supervision tree instead of manually (#4069)
- Config in one persistent term (#4093)
- C2S features optimisations (#4094)
- Patch `ejabberd_sm` (#4096)
- Use `jid:make_bare/2` instead of `jid:make/3` where appropiate (#4109)
- Unify `auth_module` and `info` in `c2s_data` record (#4110)
- Simplify specs for `ejabberd_sup` and let workers terminate (#4117)
- Raise an error if `mnesia:create_table/2` fails (#4138)

## Fixed

- Fix `mod_event_pusher:push_event/3` (#3939)
- Removing incorrect CORS headers (#4006)
- Fix handling of the undefined host type for stream errors (#4052)
- Put reporter init after app startup (#4085)
- Fix slow getaddrs call in global distribution (#4086)
- C2S fixes (#4095, #4129)
- Fix invalid username in scram authentication (#4118)
- Return a proper type from `mod_muc:node_cleanup_for_host_type/3` (#4122)
- Correctly handle the case when TLS is disabled (#4150)
- Fix error on ping timeout with stream management (#4153)
- Update epgsql to fix an issue with Erlang/OTP 26 (#4169)
- `mod_muc_light` config fix (#4178)
- Change domain validation logic (#4184)
- Require 'cacertfile' for just_tls when verify_mode = 'peer' (#4189)

## Removed

- Remove riak (#4035)
- Remove legacy CLI commands (#4160)

## Performance improvements

- Cache router, filter, and process handlers into funs (#4068)
- C2S features small optimisation (#4077)
- Replace `erlang:apply` with explicit function calls for hooks (#4073)
- Avoid calling `ejabberd_sm_backend:get_sessions/3` second time when routing presences (#4089)
- Put hooks into persistent_term using batching (#3878)

## Other

- Tests improvements/fixes (#4064, #4072, #4079, #4098, #4099, #4100, #4104, #4103, #4107, #4115, #4137, #4142, #4147, #4155, #4164)
- Documentation updates (#4030, #4034, #4055, #4087, #4130, #4133, #4181, #4190)
- CI improvements/fixes (#4023, #4026, #4027, #4029, #4097, #4112, #4149, #4145, #4152, #4166, #4167, #4171)
- Upgrade exometer_report_graphite (#4134)
- Support for Erlang 26 (#4121)
- Rename db and node to mongooseim (#4172)

## Commits, merged PRs and closed issues
- [List of merged PRs](https://github.com/esl/MongooseIM/pulls?q=is%3Apr+is%3Amerged+milestone%3A6.2.0)

- [List of closed issues](https://github.com/esl/MongooseIM/issues?q=is%3Aissue+is%3Aclosed+closed%3A2023-05-11..2023-12-13)

- [Repository history for this release](https://github.com/esl/MongooseIM/graphs/contributors?from=2023-05-11&to=2023-12-132023-12-13&type=c)

- [List of merged PRs based on merge date](https://github.com/esl/MongooseIM/pulls?q=is%3Apr+base%3Amaster+merged%3A%222023-05-11..2023-12-13%22+sort%3Acreated-asc+)

# [MongooseIM 6.1.0](https://github.com/esl/MongooseIM/releases/tag/6.1.0) - 2023-05-10

## Highlights
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* [Packages](https://www.erlang-solutions.com/resources/download.html)
* Product page: [https://www.erlang-solutions.com/products/mongooseim.html](https://www.erlang-solutions.com/products/mongooseim.html)
* Documentation: [https://esl.github.io/MongooseDocs/](https://esl.github.io/MongooseDocs/latest/)
* Try it now: [https://trymongoose.im](https://trymongoose.im)

## Get to know MongooseIM
MongooseIM is a robust, scalable and efficient XMPP server at the core of an Instant Messaging platform aimed at large installations.
Expand Down Expand Up @@ -62,6 +63,7 @@ Check out our test results:
See the documentation for the latest releases:

* [Master](https://esl.github.io/MongooseDocs/latest/)
* [6.2.0](https://esl.github.io/MongooseDocs/6.2.0/)
* [6.1.0](https://esl.github.io/MongooseDocs/6.1.0/)
* [6.0.0](https://esl.github.io/MongooseDocs/6.0.0/)
* [5.1.0](https://esl.github.io/MongooseDocs/5.1.0/)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.1.0
6.2.0
4 changes: 2 additions & 2 deletions big_tests/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
{deps, [
{lager, "3.9.2"},
{base16, "2.0.1"},
{exml, "3.3.3", {pkg, hexml}},
{exml, "3.4.0", {pkg, hexml}},
{bbmustache, "1.12.2"},
{jiffy, "1.1.1"},
{proper, "1.4.0"},
{gun, "2.0.0-rc.2"},
{fusco, "0.1.1"},
{escalus, "4.2.10"},
{escalus, "4.2.11"},
{cowboy, "2.9.0"},
{csv, "3.0.3", {pkg, csve}},
{amqp_client, "3.12.6"},
Expand Down
36 changes: 18 additions & 18 deletions big_tests/rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
{pkg,<<"credentials_obfuscation">>,<<"3.4.0">>},
1},
{<<"csv">>,{pkg,<<"csve">>,<<"3.0.3">>},0},
{<<"escalus">>,{pkg,<<"escalus">>,<<"4.2.10">>},0},
{<<"escalus">>,{pkg,<<"escalus">>,<<"4.2.11">>},0},
{<<"esip">>,{pkg,<<"esip">>,<<"1.0.48">>},0},
{<<"exml">>,{pkg,<<"hexml">>,<<"3.3.3">>},0},
{<<"exml">>,{pkg,<<"hexml">>,<<"3.4.0">>},0},
{<<"fast_pbkdf2">>,{pkg,<<"fast_pbkdf2">>,<<"1.0.3">>},2},
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.4.4">>},1},
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.5.0">>},1},
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.16">>},1},
{<<"fusco">>,{pkg,<<"fusco">>,<<"0.1.1">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
Expand All @@ -23,15 +23,15 @@
{<<"meck">>,{pkg,<<"meck">>,<<"0.9.2">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.25">>},1},
{<<"proper">>,{pkg,<<"proper">>,<<"1.4.0">>},0},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.5">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.7">>},2},
{<<"rabbit_common">>,{pkg,<<"rabbit_common">>,<<"3.12.6">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},1},
{<<"recon">>,{pkg,<<"recon">>,<<"2.5.3">>},2},
{<<"stringprep">>,{pkg,<<"stringprep">>,<<"1.0.27">>},1},
{<<"stun">>,{pkg,<<"stun">>,<<"1.2.6">>},1},
{<<"thoas">>,{pkg,<<"thoas">>,<<"1.0.0">>},2},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.5">>},1},
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"6.0.1">>},1}]}.
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.7">>},1},
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"6.2.0">>},1}]}.
[
{pkg_hash,[
{<<"amqp_client">>, <<"B0050183BB4CFBD5B3F9A3276689DFA135A196AEDC3584110F231B2CE04B0426">>},
Expand All @@ -41,11 +41,11 @@
{<<"cowlib">>, <<"0B9FF9C346629256C42EBE1EEB769A83C6CB771A6EE5960BD110AB0B9B872063">>},
{<<"credentials_obfuscation">>, <<"34E18B126B3AEFD6E8143776FBE1CECEEA6792307C99AC5EE8687911F048CFD7">>},
{<<"csv">>, <<"69E7D9B3FDC72016644368762C6A3E6CBFEB85BCCADBF1BD99AB6C827E360E04">>},
{<<"escalus">>, <<"3640C7EA77BCE0E5191751D9A02EF3A68CD0005F2705EC19026DFD96577D0434">>},
{<<"escalus">>, <<"FBEC4F874AACCFD5B493EE9CFE39F7FE9DDADFCB5054DFD83B8965B64ED43497">>},
{<<"esip">>, <<"3B3B3AFC798BE9458517D4FD2730674322368E54C2C1211AA630327354946D1B">>},
{<<"exml">>, <<"C64FE46373886FD62F3F753D8031034E231DC0C138F9CD3539F738EF220F0960">>},
{<<"exml">>, <<"18F9B02107E14F6CCDEFBDB7FEB0706C56AD3AFD0DD524BDD1F0ECD98746B9BC">>},
{<<"fast_pbkdf2">>, <<"4F09D6C6C20DBEE1970E0A6AE91432E1B7731F88426C671D083BAC31FFA1FDAD">>},
{<<"fast_scram">>, <<"299A2D430955A62A94CB43B1A727C5D21A5C4BD11AEBA476AE2F3A24CFBE89C3">>},
{<<"fast_scram">>, <<"BD0B946911B07D36EC22AD950FF22F77F27B94E4E24452AF966597C6D8CB5E7F">>},
{<<"fast_tls">>, <<"85FA7F3112EA4FF5CCB4F3ABADC130A8C855AD74EB00869487399CB0C322D208">>},
{<<"fusco">>, <<"3DD6A90151DFEF30EA1937CC44E9A59177C0094918388D9BCAA2F2DC5E2AE4AA">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
Expand All @@ -56,15 +56,15 @@
{<<"meck">>, <<"85CCBAB053F1DB86C7CA240E9FC718170EE5BDA03810A6292B5306BF31BAE5F5">>},
{<<"p1_utils">>, <<"2D39B5015A567BBD2CC7033EEB93A7C60D8C84EFE1EF69A3473FAA07FA268187">>},
{<<"proper">>, <<"89A44B8C39D28BB9B4BE8E4D715D534905B325470F2E0EC5E004D12484A79434">>},
{<<"quickrand">>, <<"06FCAD85CB47D5C85C51D6BC9C84A082501BA098A89D64AD0A2F69599E034C04">>},
{<<"quickrand">>, <<"D2BD76676A446E6A058D678444B7FDA1387B813710D1AF6D6E29BB92186C8820">>},
{<<"rabbit_common">>, <<"FEBD37E11483F94B614CD636C1EDBCE1099FF64866598F75D0A624D3A60437C6">>},
{<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>},
{<<"recon">>, <<"739107B9050EA683C30E96DE050BC59248FD27EC147696F79A8797FF9FA17153">>},
{<<"stringprep">>, <<"02808C7024BC6285CA6A8A67E7ADDFC16F35DDA55551A582C5181D8EA960E890">>},
{<<"stun">>, <<"5D1978D340EA20EFB28BC1E58779A3A1D64568C66168DB4D20692E76CE813D5E">>},
{<<"thoas">>, <<"567C03902920827A18A89F05B79A37B5BF93553154B883E0131801600CF02CE0">>},
{<<"uuid">>, <<"60FAEEB7EDFD40847ED13CB0DD1044BAABE4E79A00C0CA9C4D13A073914B1016">>},
{<<"worker_pool">>, <<"CA262C2DFB3B4AF661B206C82065D86F83922B7227508AA6E0BC34D3E5AE5135">>}]},
{<<"uuid">>, <<"B2078D2CC814F53AFA52D36C91E08962C7E7373585C623F4C0EA6DFB04B2AF94">>},
{<<"worker_pool">>, <<"506DE38C528A81ED2C6A80A419B83DDE6DA5E295BD320BDF4D35A69AFEB0247A">>}]},
{pkg_hash_ext,[
{<<"amqp_client">>, <<"B856F6404E7AF98C90DA870C8CE50D1380F13F2CEE02F16564B5CC5142BAE308">>},
{<<"base16">>, <<"06EA2D48343282E712160BA89F692B471DB8B36ABE8394F3445FF9032251D772">>},
Expand All @@ -73,11 +73,11 @@
{<<"cowlib">>, <<"2B3E9DA0B21C4565751A6D4901C20D1B4CC25CBB7FD50D91D2AB6DD287BC86A9">>},
{<<"credentials_obfuscation">>, <<"738ACE0ED5545D2710D3F7383906FC6F6B582D019036E5269C4DBD85DBCED566">>},
{<<"csv">>, <<"741D1A55AABADAA3E0FE13051050101A73E90C4570B9F9403A939D9546813521">>},
{<<"escalus">>, <<"08A84CAB2EDCE5F69EA5B93F039E6D7047FB3FF10CBD5B5AB855EE3144743B56">>},
{<<"escalus">>, <<"4E1262E6B1EEF834FE421FA1D3BBE69EF2028A8B88140DC397703B31B904C6D0">>},
{<<"esip">>, <<"02B9FC6E071415CBC62105F5115AEB68D11184BDAD3960DA7B62EA3E99E7FCCF">>},
{<<"exml">>, <<"CB54BF62E2902B52FE9CAF7E65176E764E8A10CCC51DE2DEDC0FC5C8D9F91AC6">>},
{<<"exml">>, <<"5F73224B784D45C743A949FC5AF4BB441B6B546B3D9883C0441D45401505ADD2">>},
{<<"fast_pbkdf2">>, <<"2900431E2E6402F23A92754448BBD949DA366BC9C984FDC791DDCFCC41042434">>},
{<<"fast_scram">>, <<"4B30084E3BDB39158076381FC871035BEFD157D5EE614BDA5E19EA482855E5D5">>},
{<<"fast_scram">>, <<"D45B746B8D17C0F73A94CBDB526E115A4AEDFECB4D42CA935BCB1195D783B4E1">>},
{<<"fast_tls">>, <<"AA08CCA89B4044E74F1F12E399817D8BEAEAE3EE006C98A893C0BFB1D81FBA51">>},
{<<"fusco">>, <<"6343551BD1E824F2A6CA85E1158C5B37C320FD449FBFEC7450A73F192AAF9022">>},
{<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>},
Expand All @@ -88,13 +88,13 @@
{<<"meck">>, <<"81344F561357DC40A8344AFA53767C32669153355B626EA9FCBC8DA6B3045826">>},
{<<"p1_utils">>, <<"9219214428F2C6E5D3187FF8EB9A8783695C2427420BE9A259840E07ADA32847">>},
{<<"proper">>, <<"18285842185BD33EFBDA97D134A5CB5A0884384DB36119FEE0E3CFA488568CBB">>},
{<<"quickrand">>, <<"252CF0493570EBF1A58985CB71990982CDDCD4396B6427F1E10CF58924C1C052">>},
{<<"quickrand">>, <<"B8ACBF89A224BC217C3070CA8BEBC6EB236DBE7F9767993B274084EA044D35F0">>},
{<<"rabbit_common">>, <<"D85282C8C9BE456B42AA4B265EDE68D176CA8A28DFCF1D521BE19267167C0DC3">>},
{<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>},
{<<"recon">>, <<"6C6683F46FD4A1DFD98404B9F78DCABC7FCD8826613A89DCB984727A8C3099D7">>},
{<<"stringprep">>, <<"A5967B1144CA8002A58A03D16DD109FBD0BCDB82616CEAD2F983944314AF6A00">>},
{<<"stun">>, <<"21AED098457E5099E925129459590592E001C470CF7503E5614A7A6B688FF146">>},
{<<"thoas">>, <<"FC763185B932ECB32A554FB735EE03C3B6B1B31366077A2427D2A97F3BD26735">>},
{<<"uuid">>, <<"E54373262CA88401689277947C54B95E9ECBC977BD5C57C9DD44AD9DA278E360">>},
{<<"worker_pool">>, <<"772E12CCB26909EA7F804B52E86E733DF66BB8150F683B591B0A762196494C74">>}]}
{<<"uuid">>, <<"4E4C5CA3461DC47C5E157ED42AA3981A053B7A186792AF972A27B14A9489324E">>},
{<<"worker_pool">>, <<"E1DED160797FBE656AD683109DBD741B520097DF17BDF7B51E3E4697073A6E62">>}]}
].
5 changes: 3 additions & 2 deletions big_tests/tests/anonymous_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
-module(anonymous_SUITE).
-compile([export_all, nowarn_export_all]).

-include_lib("jid/include/jid.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("eunit/include/eunit.hrl").

Expand Down Expand Up @@ -67,7 +68,7 @@ connection_is_registered_with_sasl_anon(Config) ->
escalus:story(Config, [{jon, 1}], fun(Jon) ->
JID = jid:from_binary(escalus_client:short_jid(Jon)),
OrigName = escalus_users:get_username(Config, jon),
?assertNotEqual(OrigName, JID#jid.user),
?assertNotEqual(OrigName, JID#jid.luser),
F = fun() -> rpc(mim(), ejabberd_auth, does_user_exist, [JID]) end,
true = F(),
escalus_connection:kill(Jon),
Expand All @@ -78,7 +79,7 @@ connection_is_registered_with_login(Config) ->
escalus:story(Config, [{anna, 1}], fun(Anna) ->
JID = jid:from_binary(escalus_client:short_jid(Anna)),
OrigName = escalus_users:get_username(Config, anna),
?assertEqual(OrigName, JID#jid.user),
?assertEqual(OrigName, JID#jid.luser),
F = fun() -> rpc(mim(), ejabberd_auth, does_user_exist, [JID]) end,
true = F(),
escalus_connection:kill(Anna),
Expand Down
11 changes: 6 additions & 5 deletions big_tests/tests/bind2_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

-include_lib("stdlib/include/assert.hrl").
-include_lib("exml/include/exml.hrl").
-include_lib("jid/include/jid.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").

Expand Down Expand Up @@ -100,7 +101,7 @@ auth_and_bind_to_random_resource(Config) ->
Bound = exml_query:path(Success, [{element_with_ns, <<"bound">>, ?NS_BIND_2}]),
?assertNotEqual(undefined, Bound),
Identifier = exml_query:path(Success, [{element, <<"authorization-identifier">>}, cdata]),
#jid{resource = LResource} = jid:from_binary(Identifier),
#jid{lresource = LResource} = jid:from_binary(Identifier),
?assert(0 =< byte_size(LResource), LResource).

auth_and_bind_do_not_expose_user_agent_id_in_client(Config) ->
Expand All @@ -110,7 +111,7 @@ auth_and_bind_do_not_expose_user_agent_id_in_client(Config) ->
Bound = exml_query:path(Success, [{element_with_ns, <<"bound">>, ?NS_BIND_2}]),
?assertNotEqual(undefined, Bound),
Identifier = exml_query:path(Success, [{element, <<"authorization-identifier">>}, cdata]),
#jid{resource = LResource} = jid:from_binary(Identifier),
#jid{lresource = LResource} = jid:from_binary(Identifier),
?assertNotEqual(Uuid, LResource).

auth_and_bind_contains_client_tag(Config) ->
Expand All @@ -120,7 +121,7 @@ auth_and_bind_contains_client_tag(Config) ->
Bound = exml_query:path(Success, [{element_with_ns, <<"bound">>, ?NS_BIND_2}]),
?assertNotEqual(undefined, Bound),
Identifier = exml_query:path(Success, [{element, <<"authorization-identifier">>}, cdata]),
#jid{resource = LResource} = jid:from_binary(Identifier),
#jid{lresource = LResource} = jid:from_binary(Identifier),
ResourceParts = binary:split(LResource, <<"/">>, [global]),
?assertMatch([Tag, _], ResourceParts).

Expand Down Expand Up @@ -180,7 +181,7 @@ stream_resumption_failing_does_bind_and_contains_sm_status(Config) ->
Resumed = exml_query:path(Success, [{element_with_ns, <<"failed">>, ?NS_STREAM_MGNT_3}]),
escalus:assert(is_sm_failed, [<<"item-not-found">>], Resumed),
Identifier = exml_query:path(Success, [{element, <<"authorization-identifier">>}, cdata]),
#jid{resource = LResource} = jid:from_binary(Identifier),
#jid{lresource = LResource} = jid:from_binary(Identifier),
ResourceParts = binary:split(LResource, <<"/">>, [global]),
?assertMatch([Tag, _], ResourceParts).

Expand Down Expand Up @@ -286,7 +287,7 @@ plain_auth(_Config, Client, Data, BindElems, Extra) ->
escalus:send(Client, Authenticate),
Answer = escalus_client:wait_for_stanza(Client),
Identifier = exml_query:path(Answer, [{element, <<"authorization-identifier">>}, cdata]),
#jid{resource = LResource} = jid:from_binary(Identifier),
#jid{lresource = LResource} = jid:from_binary(Identifier),
{Client, Data#{answer => Answer, client_1_jid => Identifier, bind2_resource => LResource}}.

start_peer(Config, Client, Data) ->
Expand Down
Loading

0 comments on commit 149963a

Please sign in to comment.