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

=== Config value:

    [{watchdog,<0.2017.2>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/muc_http_api_SUITE_data"},
     {preset,"pgsql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@6949c6250523.2022-05-25_10.37.44/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_10.46.08/muc_http_api_suite.send_message_to_room.108931.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@6949c6250523.2022-05-25_10.37.44/big_tests.tests.muc_http_api_SUITE.logs/run.2022-05-25_10.46.08/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]},
                     {kate,[{username,<<"kate">>},
                            {server,<<"localhost">>},
                            {password,<<"makrowe;p">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@6949c6250523.2022-05-25_10.37.44"

=== Started at 2022-05-25 10:46:08


*** CT 2022-05-25 10:46:08.844 *** View log from node mongooseim@localhost when started mongooseim@localhost_5081.html
*** CT 2022-05-25 10:46:08.845 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1929.html

*** User 2022-05-25 10:46:08.855 ***
alicE_send_message_to_room_2048@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 10:46:08.855 ***
alicE_send_message_to_room_2048@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='5875be6765535e51' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:08.855 ***
alicE_send_message_to_room_2048@localhost/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 10:46:08.855 ***
alicE_send_message_to_room_2048@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzIwNDgAbWF0eWdyeXNh</auth>



*** User 2022-05-25 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6a77082d0029f918' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/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 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/res1 out
<iq type='set' id='f6385725a971e86a39b157fbf5a25dcb'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 10:46:08.856 ***
alicE_send_message_to_room_2048@localhost/res1 in
<iq id='f6385725a971e86a39b157fbf5a25dcb' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_send_message_to_room_2048@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 10:46:08.857 ***
alice_send_message_to_room_2048@localhost/res1 out
<iq type='set' id='d202d1cefe26a9bc214dee1875b5be15'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:08.857 ***
alice_send_message_to_room_2048@localhost/res1 in
<iq type='result' id='d202d1cefe26a9bc214dee1875b5be15'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:08.857 ***
alice_send_message_to_room_2048@localhost/res1 out
<presence/>



*** User 2022-05-25 10:46:08.858 ***
alice_send_message_to_room_2048@localhost/res1 in
<presence from='alice_send_message_to_room_2048@localhost/res1' to='alice_send_message_to_room_2048@localhost/res1' xml:lang='en'/>



*** User 2022-05-25 10:46:08.858 ***
bOb_send_message_to_room_2048@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 10:46:08.859 ***
bOb_send_message_to_room_2048@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='fb19b0f957772553' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:08.859 ***
bOb_send_message_to_room_2048@localhost/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 10:46:08.859 ***
bOb_send_message_to_room_2048@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8yMDQ4AG1ha3JvbGlrYQ==</auth>



*** User 2022-05-25 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='cb8ae239a6a90c88' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-05-25 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/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 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/res1 out
<iq type='set' id='7913e1384247c5a753a92e509c87e3d5'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 10:46:08.860 ***
bOb_send_message_to_room_2048@localhost/res1 in
<iq id='7913e1384247c5a753a92e509c87e3d5' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_send_message_to_room_2048@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 10:46:08.861 ***
bob_send_message_to_room_2048@localhost/res1 out
<iq type='set' id='d03e273cc25ec1bf11ee2145908df541'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:08.861 ***
bob_send_message_to_room_2048@localhost/res1 in
<iq type='result' id='d03e273cc25ec1bf11ee2145908df541'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 10:46:08.861 ***
bob_send_message_to_room_2048@localhost/res1 out
<presence/>



*** User 2022-05-25 10:46:08.862 ***
bob_send_message_to_room_2048@localhost/res1 in
<presence from='bob_send_message_to_room_2048@localhost/res1' to='bob_send_message_to_room_2048@localhost/res1' xml:lang='en'/>



*** User 2022-05-25 10:46:08.862 ***
bob_send_message_to_room_2048@localhost/res1 out
<presence to='wonderland-68.845295@muc.localhost/bobcat'>
	<x xmlns='http://jabber.org/protocol/muc'/>
</presence>



*** User 2022-05-25 10:46:08.863 ***
bob_send_message_to_room_2048@localhost/res1 in
<presence from='wonderland-68.845295@muc.localhost/bobcat' to='bob_send_message_to_room_2048@localhost/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 10:46:08.863 ***
bob_send_message_to_room_2048@localhost/res1 in
<message from='wonderland-68.845295@muc.localhost' to='bob_send_message_to_room_2048@localhost/res1' type='groupchat'>
	<subject/>
	<body/>
</message>



*** User 2022-05-25 10:46:08.864 ***
REST request:
Code: 204
Req: {<0.2091.2>,<<"/api/mucs/localhost/wonderland-68.845295/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"4cd7144a0f02ef74">>}],
      <<"{\"from\":\"bob_send_message_to_room_2048@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Wed, 25 May 2022 10:46:08 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,463}
Params: #{body =>
              <<"{\"from\":\"bob_send_message_to_room_2048@localhost\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-68.845295/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-05-25 10:46:08.865 ***
bob_send_message_to_room_2048@localhost/res1 in
<message from='wonderland-68.845295@muc.localhost' to='bob_send_message_to_room_2048@localhost' 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 10:46:08.865 ***
bob_send_message_to_room_2048@localhost/res1 out
</stream:stream>

*** User 2022-05-25 10:46:08.865 ***
bob_send_message_to_room_2048@localhost/res1 in
</stream:stream>

*** User 2022-05-25 10:46:08.865 ***
alice_send_message_to_room_2048@localhost/res1 out
</stream:stream>

*** User 2022-05-25 10:46:08.865 ***
alice_send_message_to_room_2048@localhost/res1 in
</stream:stream>
*** CT 2022-05-25 10:46:08.867 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1929.html
*** CT 2022-05-25 10:46:08.868 *** View log from node mongooseim@localhost when finished mongooseim@localhost_5082.html



=== Ended at 2022-05-25 10:46:08
=== successfully completed test case
=== === Returned value: ok