-
Notifications
You must be signed in to change notification settings - Fork 428
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
Refactored hook handlers in mod_pubsub #3879
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportBase: 83.15% // Head: 83.14% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3879 +/- ##
==========================================
- Coverage 83.15% 83.14% -0.01%
==========================================
Files 535 535
Lines 34202 34199 -3
==========================================
- Hits 28440 28435 -5
- Misses 5762 5764 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
d7b5b80
to
929be75
Compare
small_tests_24 / small_tests / 929be75 small_tests_25 / small_tests / 929be75 ldap_mnesia_24 / ldap_mnesia / 929be75 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 929be75 dynamic_domains_mysql_redis_25 / mysql_redis / 929be75 ldap_mnesia_25 / ldap_mnesia / 929be75 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 929be75 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 929be75 muc_SUITE:register:user_submits_registration_form{error,
{{assertion_failed,assert,is_iq_result,
[{xmlel,<<"iq">>,
[{<<"type">>,<<"set">>},
{<<"id">>,<<"00d146061e157520af91a5af4ae20d9d">>},
{<<"to">>,<<"groupchats.domain.example.com">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,<<"jabber:iq:register">>}]}]},
{xmlel,<<"field">>,
[{<<"type">>,<<"text-single">>},
{<<"var">>,<<"nick">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,
<<"thirdwitchroom-c92a51cfcd">>}]}]}]}]}]}],
{xmlel,<<"iq">>,
[{<<"from">>,<<"groupchats.domain.example.com">>},
{<<"to">>,
<<"[email protected]/res1">>},
{<<"type">>,<<"error">>},
{<<"xml:lang">>,<<"en">>},
{<<"id">>,<<"00d146061e157520af91a5af4ae20d9d">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{... pgsql_mnesia_24 / pgsql_mnesia / 929be75 internal_mnesia_25 / internal_mnesia / 929be75 riak_mnesia_24 / riak_mnesia / 929be75 mysql_redis_25 / mysql_redis / 929be75 muc_SUITE:hibernation:hibernated_room_can_be_queried_for_archive{error,{{assertion_failed,assert,is_groupchat_message,
[<<"Restorable message">>],
undefined,"undefined"},
[{escalus_new_assert,assert_true,2,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
{line,84}]},
{muc_SUITE,wait_for_mam_result,3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4394}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4130}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{muc_SUITE,hibernated_room_can_be_queried_for_archive,1,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4126}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1782}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1291}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1223}]}]}} pgsql_mnesia_25 / pgsql_mnesia / 929be75 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 929be75 mssql_mnesia_25 / odbc_mssql_mnesia / 929be75 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 929be75 mysql_redis_25 / mysql_redis / 929be75 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌🏽
@@ -151,7 +151,7 @@ iq_ping(Acc, _From, _To, #iq{sub_el = SubEl} = IQ, _) -> | |||
|
|||
-spec handle_remote_hook(Acc, Params, Extra) -> {ok, Acc} when | |||
Acc :: term(), | |||
Params :: #{tag := atom(), args := term(), c2s_state := ejabberd_c2s:state()}, | |||
Params :: #{tag := atom(), hook_args := term(), c2s_state := ejabberd_c2s:state()}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How comes dialyzer didn't complain here 😢
affiliation_to_string/1, | ||
create_node/7, | ||
default_host/0, | ||
delete_item/4, | ||
delete_node/3, | ||
extended_error/3, | ||
get_cached_item/2, | ||
get_item/3, | ||
get_items/2, | ||
host/2, | ||
iq_sm/4, | ||
node_action/4, | ||
node_call/4, | ||
plugin/2, | ||
plugin/1, | ||
publish_item/6, | ||
send_items/7, | ||
serverhost/1, | ||
start_link/2, | ||
string_to_affiliation/1, | ||
string_to_subscription/1, | ||
subscribe_node/5, | ||
subscription_to_string/1, | ||
tree_action/3, | ||
unsubscribe_node/5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if all these ignore_xrefs are really needed, but I don't know 🙄
This PR changes all hook handlers in
mod_pubsub
module togen_hook
format.