=== Test case: muc_http_api_SUITE:send_message_to_room/1 (click for source code)
=== Config value:
[{watchdog,<0.65008.0>},
{preset,"mysql_redis"},
{mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@eebaa68b7995.2024-01-14_19.39.51/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.49.38/muc_http_api_suite.send_message_to_room.133251.html"},
{tc_group_properties,[{name,positive},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/muc_http_api_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@eebaa68b7995.2024-01-14_19.39.51/big_tests.tests.muc_http_api_SUITE.logs/run.2024-01-14_19.49.38/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrolika">>}]},
{kate,[{username,<<"kate">>},
{server,<<"domain.example.com">>},
{host,<<"localhost">>},
{password,<<"makrowe;p">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@eebaa68b7995.2024-01-14_19.39.51"
=== Started at 2024-01-14 19:49:38
*** User 2024-01-14 19:49:38.153 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-01-14 19:49:38.153 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='251a118c9779dd15' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2024-01-14 19:49:38.153 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-01-14 19:49:38.154 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzI0OTIAbWF0eWdyeXNh</auth>
*** User 2024-01-14 19:49:38.154 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-01-14 19:49:38.154 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-01-14 19:49:38.155 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='8fbacfdb5407bd1f' from='domain.example.com' version='1.0' xml:lang='en' to='alice_send_message_to_room_2492@domain.example.com'>
*** User 2024-01-14 19:49:38.155 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-01-14 19:49:38.155 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 out
<iq type='set' id='ad88613c3c1f57572cca2eda22d7b495'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-01-14 19:49:38.155 ***🔗
alicE_send_message_to_room_2492@domain.example.com/res1 in
<iq id='ad88613c3c1f57572cca2eda22d7b495' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alice_send_message_to_room_2492@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2024-01-14 19:49:38.155 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 out
<iq type='set' id='395a752d55ddc57262b7b5d4ec9682c2'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-01-14 19:49:38.156 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 in
<iq from='domain.example.com' to='alice_send_message_to_room_2492@domain.example.com/res1' id='395a752d55ddc57262b7b5d4ec9682c2' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-01-14 19:49:38.156 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 out
<presence/>
*** User 2024-01-14 19:49:38.157 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 in
<presence from='alice_send_message_to_room_2492@domain.example.com/res1' to='alice_send_message_to_room_2492@domain.example.com/res1'/>
*** User 2024-01-14 19:49:38.158 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-01-14 19:49:38.158 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e70ef9f32a344330' from='domain.example.com' version='1.0' xml:lang='en'>
*** User 2024-01-14 19:49:38.158 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<stream:features>
<register xmlns='http://jabber.org/features/iq-register'/>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-01-14 19:49:38.158 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8yNDkyAG1ha3JvbGlrYQ==</auth>
*** User 2024-01-14 19:49:38.159 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2024-01-14 19:49:38.159 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2024-01-14 19:49:38.159 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d97c726cb875e6a8' from='domain.example.com' version='1.0' xml:lang='en' to='bob_send_message_to_room_2492@domain.example.com'>
*** User 2024-01-14 19:49:38.159 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<stream:features>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2024-01-14 19:49:38.159 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 out
<iq type='set' id='e348aea0559a61596db662b6864238eb'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2024-01-14 19:49:38.160 ***🔗
bOb_send_message_to_room_2492@domain.example.com/res1 in
<iq id='e348aea0559a61596db662b6864238eb' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bob_send_message_to_room_2492@domain.example.com/res1</jid>
</bind>
</iq>
*** User 2024-01-14 19:49:38.160 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 out
<iq type='set' id='1b71e6582fe03b28b235d68a1ba11ac7'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-01-14 19:49:38.160 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
<iq from='domain.example.com' to='bob_send_message_to_room_2492@domain.example.com/res1' id='1b71e6582fe03b28b235d68a1ba11ac7' type='result'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2024-01-14 19:49:38.160 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 out
<presence/>
*** User 2024-01-14 19:49:38.162 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
<presence from='bob_send_message_to_room_2492@domain.example.com/res1' to='bob_send_message_to_room_2492@domain.example.com/res1'/>
*** User 2024-01-14 19:49:38.162 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 out
<presence to='wonderland-78.145382@groupchats.domain.example.com/bobcat'>
<x xmlns='http://jabber.org/protocol/muc'/>
</presence>
*** User 2024-01-14 19:49:38.163 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
<presence from='wonderland-78.145382@groupchats.domain.example.com/bobcat' to='bob_send_message_to_room_2492@domain.example.com/res1'>
<x xmlns='http://jabber.org/protocol/muc'>
<item affiliation='none' role='participant'/>
<status code='110'/>
<status code='201'/>
</x>
</presence>
*** User 2024-01-14 19:49:38.164 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
<message from='wonderland-78.145382@groupchats.domain.example.com' to='bob_send_message_to_room_2492@domain.example.com/res1' type='groupchat'>
<subject/>
<body/>
</message>
*** User 2024-01-14 19:49:38.165 ***🔗
REST request:
Code: 204
Req: {<0.65073.0>,
<<"/api/mucs/domain.example.com/wonderland-78.145382/messages">>,
<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"b41349f5d648af7a">>}],
<<"{\"from\":\"bob_send_message_to_room_2492@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Sun, 14 Jan 2024 19:49:38 GMT">>}],
<<>>,80,323}
Params: #{path =>
<<"/api/mucs/domain.example.com/wonderland-78.145382/messages">>,
server => #{node => mongooseim@localhost},
body =>
<<"{\"from\":\"bob_send_message_to_room_2492@domain.example.com\",\"body\":\"Greetings!\"}">>,
method => <<"POST">>,role => admin,return_headers => true}
*** User 2024-01-14 19:49:38.165 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
<message from='wonderland-78.145382@groupchats.domain.example.com' to='bob_send_message_to_room_2492@domain.example.com' type='error'>
<body>Greetings!</body>
<error code='406' type='modify'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Only occupants are allowed to send messages to the conference</text>
</error>
</message>
*** User 2024-01-14 19:49:38.165 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 out
</stream:stream>
*** User 2024-01-14 19:49:38.166 ***🔗
bob_send_message_to_room_2492@domain.example.com/res1 in
</stream:stream>
*** User 2024-01-14 19:49:38.166 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 out
</stream:stream>
*** User 2024-01-14 19:49:38.166 ***🔗
alice_send_message_to_room_2492@domain.example.com/res1 in
</stream:stream>
=== Ended at 2024-01-14 19:49:38
=== successfully completed test case
=== === Returned value: ok