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

=== Config value:

    [{watchdog,<0.29789.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@f35493351768.2022-03-18_10.50.10/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_11.00.19/muc_http_api_suite.send_message_to_room.105091.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@f35493351768.2022-03-18_10.50.10/big_tests.tests.muc_http_api_SUITE.logs/run.2022-03-18_11.00.19/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@f35493351768.2022-03-18_10.50.10"

=== Started at 2022-03-18 11:00:19


*** CT 2022-03-18 11:00:19.755 *** View log from node mongooseim@localhost when started mongooseim@localhost_4337.html
*** CT 2022-03-18 11:00:19.756 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_1963.html

*** User 2022-03-18 11:00:19.770 ***
alicE_send_message_to_room_2084@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-03-18 11:00:19.770 ***
alicE_send_message_to_room_2084@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='d2f463b587492a26' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:19.770 ***
alicE_send_message_to_room_2084@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-03-18 11:00:19.770 ***
alicE_send_message_to_room_2084@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3NlbmRfbWVzc2FnZV90b19yb29tXzIwODQAbWF0eWdyeXNh</auth>



*** User 2022-03-18 11:00:19.771 ***
alicE_send_message_to_room_2084@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 11:00:19.771 ***
alicE_send_message_to_room_2084@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-03-18 11:00:19.772 ***
alicE_send_message_to_room_2084@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6cde5686016e18b2' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:19.772 ***
alicE_send_message_to_room_2084@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-03-18 11:00:19.772 ***
alicE_send_message_to_room_2084@localhost/res1 out
<iq type='set' id='36647d60bf2e23dc4159ba4798ff7755'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 11:00:19.772 ***
alicE_send_message_to_room_2084@localhost/res1 in
<iq id='36647d60bf2e23dc4159ba4798ff7755' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_send_message_to_room_2084@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 11:00:19.772 ***
alicE_send_message_to_room_2084@localhost/res1 out
<iq type='set' id='c150e0880bd12e89931d44d1ddfcc21b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:19.773 ***
alicE_send_message_to_room_2084@localhost/res1 in
<iq type='result' id='c150e0880bd12e89931d44d1ddfcc21b'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:19.773 ***
alicE_send_message_to_room_2084@localhost/res1 out
<presence/>



*** User 2022-03-18 11:00:19.776 ***
alicE_send_message_to_room_2084@localhost/res1 in
<presence from='alicE_send_message_to_room_2084@localhost/res1' to='alice_send_message_to_room_2084@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 11:00:19.776 ***
bOb_send_message_to_room_2084@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-03-18 11:00:19.784 ***
bOb_send_message_to_room_2084@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='67e2aaadb0348118' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:19.784 ***
bOb_send_message_to_room_2084@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-03-18 11:00:19.784 ***
bOb_send_message_to_room_2084@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zZW5kX21lc3NhZ2VfdG9fcm9vbV8yMDg0AG1ha3JvbGlrYQ==</auth>



*** User 2022-03-18 11:00:19.791 ***
bOb_send_message_to_room_2084@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-18 11:00:19.791 ***
bOb_send_message_to_room_2084@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-03-18 11:00:19.792 ***
bOb_send_message_to_room_2084@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a15b3c902ac43698' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-18 11:00:19.792 ***
bOb_send_message_to_room_2084@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-03-18 11:00:19.792 ***
bOb_send_message_to_room_2084@localhost/res1 out
<iq type='set' id='19a40e03ef6cdbc8859dbb29e3c2308b'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-18 11:00:19.794 ***
bOb_send_message_to_room_2084@localhost/res1 in
<iq id='19a40e03ef6cdbc8859dbb29e3c2308b' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_send_message_to_room_2084@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-18 11:00:19.794 ***
bOb_send_message_to_room_2084@localhost/res1 out
<iq type='set' id='cf3a67a2cb66a418b8d384fe2698f5db'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:19.794 ***
bOb_send_message_to_room_2084@localhost/res1 in
<iq type='result' id='cf3a67a2cb66a418b8d384fe2698f5db'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-18 11:00:19.795 ***
bOb_send_message_to_room_2084@localhost/res1 out
<presence/>



*** User 2022-03-18 11:00:19.801 ***
bOb_send_message_to_room_2084@localhost/res1 in
<presence from='bOb_send_message_to_room_2084@localhost/res1' to='bob_send_message_to_room_2084@localhost/res1' xml:lang='en'/>



*** User 2022-03-18 11:00:19.806 ***
bOb_send_message_to_room_2084@localhost/res1 out
<presence to='wonderland-19.756458@muc.localhost/bobcat'>
	<x xmlns='http://jabber.org/protocol/muc'/>
</presence>



*** User 2022-03-18 11:00:19.812 ***
bOb_send_message_to_room_2084@localhost/res1 in
<presence from='wonderland-19.756458@muc.localhost/bobcat' to='bOb_send_message_to_room_2084@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-03-18 11:00:19.812 ***
bOb_send_message_to_room_2084@localhost/res1 in
<message from='wonderland-19.756458@muc.localhost' to='bOb_send_message_to_room_2084@localhost/res1' type='groupchat'>
	<subject/>
	<body/>
</message>



*** User 2022-03-18 11:00:19.815 ***
REST request:
Code: 204
Req: {<0.29866.1>,<<"/api/mucs/localhost/wonderland-19.756458/messages">>,
      <<"POST">>,
      [{<<"Content-Type">>,<<"application/json">>},
       {<<"Request-Id">>,<<"9923eba5bf13e49f">>}],
      <<"{\"from\":\"bOb_send_message_to_room_2084@localhost\",\"body\":\"Greetings!\"}">>}
Result: {{<<"204">>,<<"No Content">>},
         [{<<"server">>,<<"Cowboy">>},
          {<<"date">>,<<"Fri, 18 Mar 2022 11:00:19 GMT">>},
          {<<"content-type">>,<<"application/json">>}],
         <<>>,112,1216}
Params: #{body =>
              <<"{\"from\":\"bOb_send_message_to_room_2084@localhost\",\"body\":\"Greetings!\"}">>,
          method => <<"POST">>,
          path => <<"/api/mucs/localhost/wonderland-19.756458/messages">>,
          return_headers => true,role => admin,
          server => #{node => mongooseim@localhost}}


*** User 2022-03-18 11:00:19.815 ***
bOb_send_message_to_room_2084@localhost/res1 in
<message from='wonderland-19.756458@muc.localhost' to='bOb_send_message_to_room_2084@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-03-18 11:00:19.815 ***
bOb_send_message_to_room_2084@localhost/res1 out
</stream:stream>

*** User 2022-03-18 11:00:19.816 ***
bOb_send_message_to_room_2084@localhost/res1 in
</stream:stream>

*** User 2022-03-18 11:00:19.816 ***
alicE_send_message_to_room_2084@localhost/res1 out
</stream:stream>

*** User 2022-03-18 11:00:19.817 ***
alicE_send_message_to_room_2084@localhost/res1 in
</stream:stream>
*** CT 2022-03-18 11:00:19.821 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_1963.html
*** CT 2022-03-18 11:00:19.825 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4338.html



=== Ended at 2022-03-18 11:00:19
=== successfully completed test case
=== === Returned value: ok