Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retract on stanza ids #3377

Merged
merged 8 commits into from Oct 29, 2021
Merged

Retract on stanza ids #3377

merged 8 commits into from Oct 29, 2021

Conversation

NelsonVides
Copy link
Collaborator

As explained in the docs:

This module also implements an extension to the XEP, where it allows to specify the stanza-id as created by the server's MAM, instead of the origin-id that the original XEP-0424 specifies. It announces this capability under the namespace urn:esl:message-retract:0. This is specially useful in groupchats where the stanza-id of a message is shared and known for all participants.

@mongoose-im

This comment has been minimized.

@codecov
Copy link

codecov bot commented Oct 28, 2021

Codecov Report

Merging #3377 (be52eb1) into master (b816c7d) will decrease coverage by 0.05%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3377      +/-   ##
==========================================
- Coverage   80.71%   80.66%   -0.06%     
==========================================
  Files         397      397              
  Lines       32445    32461      +16     
==========================================
- Hits        26188    26184       -4     
- Misses       6257     6277      +20     
Impacted Files Coverage Δ
src/mam/mod_mam_rdbms_arch.erl 50.49% <20.00%> (-0.53%) ⬇️
src/mam/mod_mam_utils.erl 89.74% <92.85%> (+0.23%) ⬆️
src/mam/mam_decoder.erl 100.00% <100.00%> (ø)
src/mam/mod_mam_muc_rdbms_arch.erl 95.09% <100.00%> (+0.14%) ⬆️
src/event_pusher/mod_event_pusher.erl 65.00% <0.00%> (-22.50%) ⬇️
src/mod_roster_riak.erl 81.53% <0.00%> (-15.39%) ⬇️
src/ejabberd.erl 45.00% <0.00%> (-10.00%) ⬇️
src/mam/mod_mam_rdbms_async_pool_writer.erl 66.66% <0.00%> (-3.93%) ⬇️
src/metrics/mongoose_metrics.erl 95.45% <0.00%> (-0.65%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.43% <0.00%> (-0.43%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b816c7d...be52eb1. Read the comment docs.

Base automatically changed from same_stanza_id_for_peers to master October 28, 2021 18:30
@mongoose-im

This comment has been minimized.

@mongoose-im

This comment has been minimized.

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, but added a comment

src/mam/mod_mam_utils.erl Outdated Show resolved Hide resolved
Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing! 😀

@mongoose-im

This comment has been minimized.

Make the namespace more distinguishable, and extend the return to also
contain the origin-id if not empty.
@mongoose-im

This comment has been minimized.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Oct 29, 2021

small_tests_24 / small_tests / be52eb1
Reports root / small


internal_mnesia_24 / internal_mnesia / be52eb1
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 297 / Auto-skipped: 0


small_tests_23 / small_tests / be52eb1
Reports root / small


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / be52eb1
Reports root/ big
OK: 2724 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / be52eb1
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 400 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / be52eb1
Reports root/ big
OK: 2724 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / be52eb1
Reports root/ big
OK: 2724 / Failed: 0 / User-skipped: 186 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / be52eb1
Reports root/ big
OK: 2707 / Failed: 0 / User-skipped: 203 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / be52eb1
Reports root/ big
OK: 1864 / Failed: 0 / User-skipped: 327 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / be52eb1
Reports root/ big
OK: 3093 / Failed: 0 / User-skipped: 213 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / be52eb1
Reports root/ big
OK: 1489 / Failed: 1 / User-skipped: 400 / Auto-skipped: 0

mod_event_pusher_rabbit_SUITE:group_chat_message_publish:group_chat_message_received_event_properly_formatted
{error,
  {{assertMatch,
     [{module,mod_event_pusher_rabbit_SUITE},
      {line,435},
      {expression,
        "get_decoded_message_from_rabbit ( AliceGroupChatMsgRecvRK )"},
      {pattern,
        "# { << \"from_user_id\" >> := BobRoomJID , << \"to_user_id\" >> := AliceFullJID , << \"message\" >> := Message }"},
      {value,
        #{<<"from_user_id">> =>
          <<"muc_publish@muc.localhost/bOb_unnamed_35.63120">>,
        <<"message">> => <<"Hi there!">>,
        <<"to_user_id">> =>
          <<"alice_unnamed_35.182372@localhost/res1">>}}]},
   [{mod_event_pusher_rabbit_SUITE,
      '-group_chat_message_received_event_properly_formatted/1-fun-0-',3,
      [{file,
         "/home/circleci/app/big_tests/tests/mod_event_pusher_rabbit_SUITE.erl"},
       {line,435}]},
    {escalus_story,story,4,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
       {line,72}]},
    {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1784}]},
    {test_server,run_test_case_eval1,6,
      [{file,"test_server.erl"},{line,1293}]},
    {test_server,run_test_case_eval,9,
      [{file,"test_server.erl"},{line,1225}]}]}}

Report log


mysql_redis_24 / mysql_redis / be52eb1
Reports root/ big
OK: 3076 / Failed: 0 / User-skipped: 230 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / be52eb1
Reports root/ big
OK: 3128 / Failed: 3 / User-skipped: 213 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_52.881892@localhost/res1">>},
        {<<"id">>,<<"b638f211-ff93-4843-b70c-f02848ef5e95">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"9cb293ab-a38f-44db-9560-9648d4fd7c19">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_52.881892@localhost/res1' id='b638f211-ff93-4843-b70c-f02848ef5e95' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='9cb293ab-a38f-44db-9560-9648d4fd7c19'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,395}]},
    {jingle_SUITE,
      '-res...

Report log

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_62.866871@localhost/res1">>},
        {<<"id">>,<<"431f61ec-6567-4c4d-8588-e44d4e8962f3">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"0f0e49b3-b371-4e4b-b89a-e93f274e4ceb">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_62.866871@localhost/res1' id='431f61ec-6567-4c4d-8588-e44d4e8962f3' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='0f0e49b3-b371-4e4b-b89a-e93f274e4ceb'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,395}]},
    {jingle_SUITE,
      '-res...

Report log

jingle_SUITE:all:jingle_session_is_established_with_a_conference_room
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"*901@numbers.localhost">>},
        {<<"to">>,
         <<"alice_jingle_session_is_established_with_a_conference_room_73.142557@localhost/res1">>},
        {<<"id">>,<<"0644526e-216f-4a71-94c8-92d3a471dbb3">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-info">>},
           {<<"sid">>,<<"f2cab5bd-343b-4b0d-898a-a5f522012544">>}],
          [{xmlel,<<"ringing">>,
             [{<<"xmlns">>,<<"urn:xmpp:jingle:apps:rtp:info:1">>}],
             []}]}]},
     "<iq from='*901@numbers.localhost' to='alice_jingle_session_is_established_with_a_conference_room_73.142557@localhost/res1' id='0644526e-216f-4a71-94c8-92d3a471dbb3' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-info' sid='f2cab5bd-343b-4b0d-898a-a5f522012544'><ringing xmlns='urn:xmpp:jingle:apps:rtp:info:1'/></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,395}]},
    {jingle_SUITE,
      '-jingle_session_is_established_with_a_conference_room/1-fun-0-',1,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,1...

Report log


pgsql_mnesia_23 / pgsql_mnesia / be52eb1
Reports root/ big
OK: 3093 / Failed: 0 / User-skipped: 213 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / be52eb1
Reports root/ big
OK: 1710 / Failed: 0 / User-skipped: 328 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / be52eb1
Reports root/ big
OK: 3093 / Failed: 0 / User-skipped: 213 / Auto-skipped: 0

Copy link
Contributor

@arcusfelis arcusfelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@arcusfelis arcusfelis merged commit fc29465 into master Oct 29, 2021
@arcusfelis arcusfelis deleted the retract_on_stanza_ids branch October 29, 2021 16:34
@Premwoik Premwoik modified the milestones: 5.1.0, 5.0.0 May 25, 2022
@Premwoik Premwoik modified the milestones: 5.0.0, 5.1.0 May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants