=== Test case: muc_http_api_SUITE:send_message_to_room/1 (click for source code)

=== Config value:

    [{watchdog,<0.26575.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_09.12.13/muc_http_api_suite.send_message_to_room.129538.html"},
     {tc_group_properties,[{name,positive},{repeat_until_all_ok,3},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@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_09.12.13/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@f0b09cc3aef4.2022-05-25_09.03.38"

=== Started at 2022-05-25 09:12:14


*** CT 2022-05-25 09:12:14.106 *** View log from node mongooseim@localhost when started mongooseim@localhost_2259.html
*** CT 2022-05-25 09:12:14.107 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_489.html

*** User 2022-05-25 09:12:14.114 ***
alicE_send_message_to_room_1935@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 2022-05-25 09:12:14.115 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='430b9d6147d884c1' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:12:14.115 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-25 09:12:14.115 ***
alicE_send_message_to_room_1935@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzE5MzUAbWF0eWdyeXNh</auth>



*** User 2022-05-25 09:12:14.116 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 09:12:14.116 ***
alicE_send_message_to_room_1935@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 2022-05-25 09:12:14.116 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='b0a16e89127e94ca' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:12:14.116 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-25 09:12:14.116 ***
alicE_send_message_to_room_1935@domain.example.com/res1 out
<iq type='set' id='2979406c56bbe450f516a667770a359e'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 09:12:14.117 ***
alicE_send_message_to_room_1935@domain.example.com/res1 in
<iq id='2979406c56bbe450f516a667770a359e' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_send_message_to_room_1935@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 09:12:14.117 ***
alice_send_message_to_room_1935@domain.example.com/res1 out
<iq type='set' id='94986c07c0b6faabc7a56f844bee3adf'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:12:14.117 ***
alice_send_message_to_room_1935@domain.example.com/res1 in
<iq type='result' id='94986c07c0b6faabc7a56f844bee3adf'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:12:14.117 ***
alice_send_message_to_room_1935@domain.example.com/res1 out
<presence/>



*** User 2022-05-25 09:12:14.118 ***
alice_send_message_to_room_1935@domain.example.com/res1 in
<presence from='alice_send_message_to_room_1935@domain.example.com/res1' to='alice_send_message_to_room_1935@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:12:14.119 ***
bOb_send_message_to_room_1935@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 2022-05-25 09:12:14.119 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='ed6cb31a1a915759' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:12:14.119 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>SCRAM-SHA-256</mechanism>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-25 09:12:14.119 ***
bOb_send_message_to_room_1935@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8xOTM1AG1ha3JvbGlrYQ==</auth>



*** User 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@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 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7bc83f3895014d2f' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@domain.example.com/res1 out
<iq type='set' id='a81d247a8da0aa9e01f421b032fa0467'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 09:12:14.121 ***
bOb_send_message_to_room_1935@domain.example.com/res1 in
<iq id='a81d247a8da0aa9e01f421b032fa0467' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_send_message_to_room_1935@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 09:12:14.121 ***
bob_send_message_to_room_1935@domain.example.com/res1 out
<iq type='set' id='c3029327e91e52ead7f8e3e5a10f2f80'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:12:14.122 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
<iq type='result' id='c3029327e91e52ead7f8e3e5a10f2f80'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:12:14.122 ***
bob_send_message_to_room_1935@domain.example.com/res1 out
<presence/>



*** User 2022-05-25 09:12:14.123 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
<presence from='bob_send_message_to_room_1935@domain.example.com/res1' to='bob_send_message_to_room_1935@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:12:14.124 ***
bob_send_message_to_room_1935@domain.example.com/res1 out
<presence to='wonderland-34.107321@groupchats.domain.example.com/bobcat'>
	<x xmlns='http://jabber.org/protocol/muc'/>
</presence>



*** User 2022-05-25 09:12:14.125 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
<presence from='wonderland-34.107321@groupchats.domain.example.com/bobcat' to='bob_send_message_to_room_1935@domain.example.com/res1' xml:lang='en'>
	<x xmlns='http://jabber.org/protocol/muc#user'>
		<item affiliation='none' role='participant'/>
		<status code='110'/>
		<status code='201'/>
	</x>
</presence>



*** User 2022-05-25 09:12:14.125 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
<message from='wonderland-34.107321@groupchats.domain.example.com' to='bob_send_message_to_room_1935@domain.example.com/res1' type='groupchat'>
	<subject/>
	<body/>
</message>



*** User 2022-05-25 09:12:14.127 ***
REST request:
Code: 204
Req: {<0.26650.1>,
      <<"/api/mucs/domain.example.com/wonderland-34.107321/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"c9512f7a058e3c74">>}],
      <<"{\"from\":\"bob_send_message_to_room_1935@domain.example.com\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 25 May 2022 09:12:13 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,537}
Params: #{body =>
              <<"{\"from\":\"bob_send_message_to_room_1935@domain.example.com\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,
          path =>
              <<"/api/mucs/domain.example.com/wonderland-34.107321/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-25 09:12:14.127 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
<message from='wonderland-34.107321@groupchats.domain.example.com' to='bob_send_message_to_room_1935@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 2022-05-25 09:12:14.127 ***
bob_send_message_to_room_1935@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-25 09:12:14.127 ***
bob_send_message_to_room_1935@domain.example.com/res1 in
</stream:stream>

*** User 2022-05-25 09:12:14.127 ***
alice_send_message_to_room_1935@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-25 09:12:14.128 ***
alice_send_message_to_room_1935@domain.example.com/res1 in
</stream:stream>
*** CT 2022-05-25 09:12:14.130 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_489.html
*** CT 2022-05-25 09:12:14.131 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2259.html



=== Ended at 2022-05-25 09:12:14
=== successfully completed test case
=== === Returned value: ok