-
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
GraphQL - Implement inbox API #3694
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report
@@ Coverage Diff @@
## master #3694 +/- ##
==========================================
- Coverage 82.14% 82.12% -0.03%
==========================================
Files 510 513 +3
Lines 33596 33638 +42
==========================================
+ Hits 27599 27624 +25
- Misses 5997 6014 +17
Continue to review full report at Codecov.
|
7c70d7f
to
e218283
Compare
small_tests_24 / small_tests / e218283 small_tests_25 / small_tests / e218283 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / e218283 ldap_mnesia_24 / ldap_mnesia / e218283 graphql_inbox_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,insert_new,
[prepared_statements,
{muc_light_config_delete_all,<<"muc_light_config">>,
[],<<"DELETE FROM muc_light_config">>}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_rdbms,prepare,4,
[{file,
"/home/circleci/project/src/rdbms/mongoose_rdbms.erl"},
{line,212}]},
{mod_muc_light_db_rdbms,prepare_cleaning_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,93}]},
{mod_muc_light_db_rdbms,prepare_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,84}]},
{mod_muc_light_db_rdbms,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,74}]},
{mod_muc_light,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light.erl"},
{line,173}]},
{gen_mod,start_module_for_host_type,3,
[{file,"/home/circleci/project/src/gen_mod.erl"},
{line,103}]},
{mongoose_modules,start_module,4,
[{file,
"/home/circleci/project/src/mongoose_modules.erl"},
{line,90}]}]}}},
[{distributed_helper,... dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / e218283 dynamic_domains_mysql_redis_25 / mysql_redis / e218283 ldap_mnesia_25 / ldap_mnesia / e218283 graphql_inbox_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,insert_new,
[prepared_statements,
{muc_light_config_delete_all,<<"muc_light_config">>,
[],<<"DELETE FROM muc_light_config">>}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_rdbms,prepare,4,
[{file,
"/home/circleci/project/src/rdbms/mongoose_rdbms.erl"},
{line,212}]},
{mod_muc_light_db_rdbms,prepare_cleaning_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,93}]},
{mod_muc_light_db_rdbms,prepare_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,84}]},
{mod_muc_light_db_rdbms,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,74}]},
{mod_muc_light,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light.erl"},
{line,173}]},
{gen_mod,start_module_for_host_type,3,
[{file,"/home/circleci/project/src/gen_mod.erl"},
{line,103}]},
{mongoose_modules,start_module,4,
[{file,
"/home/circleci/project/src/mongoose_modules.erl"},
{line,90}]}]}}},
[{distributed_helper,... dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / e218283 internal_mnesia_25 / internal_mnesia / e218283 graphql_inbox_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,insert_new,
[prepared_statements,
{muc_light_config_delete_all,<<"muc_light_config">>,
[],<<"DELETE FROM muc_light_config">>}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_rdbms,prepare,4,
[{file,
"/home/circleci/project/src/rdbms/mongoose_rdbms.erl"},
{line,212}]},
{mod_muc_light_db_rdbms,prepare_cleaning_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,93}]},
{mod_muc_light_db_rdbms,prepare_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,84}]},
{mod_muc_light_db_rdbms,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,74}]},
{mod_muc_light,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light.erl"},
{line,173}]},
{gen_mod,start_module_for_host_type,3,
[{file,"/home/circleci/project/src/gen_mod.erl"},
{line,103}]},
{mongoose_modules,start_module,4,
[{file,
"/home/circleci/project/src/mongoose_modules.erl"},
{line,90}]}]}}},
[{distributed_helper,... pgsql_mnesia_24 / pgsql_mnesia / e218283 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / e218283 graphql_inbox_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,insert_new,
[prepared_statements,
{muc_light_config_delete_all,<<"muc_light_config">>,
[],<<"DELETE FROM muc_light_config">>}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_rdbms,prepare,4,
[{file,
"/home/circleci/project/src/rdbms/mongoose_rdbms.erl"},
{line,212}]},
{mod_muc_light_db_rdbms,prepare_cleaning_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,93}]},
{mod_muc_light_db_rdbms,prepare_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,84}]},
{mod_muc_light_db_rdbms,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,74}]},
{mod_muc_light,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light.erl"},
{line,173}]},
{gen_mod,start_module_for_host_type,3,
[{file,"/home/circleci/project/src/gen_mod.erl"},
{line,103}]},
{mongoose_modules,start_module,4,
[{file,
"/home/circleci/project/src/mongoose_modules.erl"},
{line,90}]}]}}},
[{distributed_helper,... pgsql_mnesia_25 / pgsql_mnesia / e218283 mysql_redis_25 / mysql_redis / e218283 riak_mnesia_24 / riak_mnesia / e218283 graphql_inbox_SUITE:init_per_suite{'EXIT',
{{badrpc,
{'EXIT',
{badarg,
[{ets,insert_new,
[prepared_statements,
{muc_light_config_delete_all,<<"muc_light_config">>,
[],<<"DELETE FROM muc_light_config">>}],
[{error_info,
#{cause => id,module => erl_stdlib_errors}}]},
{mongoose_rdbms,prepare,4,
[{file,
"/home/circleci/project/src/rdbms/mongoose_rdbms.erl"},
{line,212}]},
{mod_muc_light_db_rdbms,prepare_cleaning_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,93}]},
{mod_muc_light_db_rdbms,prepare_queries,0,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,84}]},
{mod_muc_light_db_rdbms,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light_db_rdbms.erl"},
{line,74}]},
{mod_muc_light,start,2,
[{file,
"/home/circleci/project/src/muc_light/mod_muc_light.erl"},
{line,173}]},
{gen_mod,start_module_for_host_type,3,
[{file,"/home/circleci/project/src/gen_mod.erl"},
{line,103}]},
{mongoose_modules,start_module,4,
[{file,
"/home/circleci/project/src/mongoose_modules.erl"},
{line,90}]}]}}},
[{distributed_helper,... mssql_mnesia_25 / odbc_mssql_mnesia / e218283 pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2132@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2132@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"3AU8N5wmFvEX+lqrFWFLpA==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{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}]}]}} |
e218283
to
de87049
Compare
small_tests_24 / small_tests / de87049 small_tests_25 / small_tests / de87049 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / de87049 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / de87049 ldap_mnesia_24 / ldap_mnesia / de87049 dynamic_domains_mysql_redis_25 / mysql_redis / de87049 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / de87049 ldap_mnesia_25 / ldap_mnesia / de87049 pgsql_mnesia_24 / pgsql_mnesia / de87049 internal_mnesia_25 / internal_mnesia / de87049 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / de87049 pgsql_mnesia_25 / pgsql_mnesia / de87049 mysql_redis_25 / mysql_redis / de87049 riak_mnesia_24 / riak_mnesia / de87049 mssql_mnesia_25 / odbc_mssql_mnesia / de87049 |
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.
Looks good in general, I added a few comments.
Now the user needs to give a positive integer value to remove older than `n` days or null to flush all.
This comment was marked as outdated.
This comment was marked as outdated.
ee4d265
to
cb6ae8f
Compare
small_tests_24 / small_tests / cb6ae8f small_tests_25 / small_tests / cb6ae8f dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / cb6ae8f dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / cb6ae8f ldap_mnesia_24 / ldap_mnesia / cb6ae8f dynamic_domains_mysql_redis_25 / mysql_redis / cb6ae8f ldap_mnesia_25 / ldap_mnesia / cb6ae8f pgsql_mnesia_24 / pgsql_mnesia / cb6ae8f internal_mnesia_25 / internal_mnesia / cb6ae8f elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / cb6ae8f pgsql_mnesia_25 / pgsql_mnesia / cb6ae8f mysql_redis_25 / mysql_redis / cb6ae8f pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2096@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2096@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"EP9lejYWqQKJ02Qj1OI5wg==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{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}]}]}} riak_mnesia_24 / riak_mnesia / cb6ae8f mssql_mnesia_25 / odbc_mssql_mnesia / cb6ae8f 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,4383}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4124}]},
{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,4120}]},
{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}]}]}} 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,4383}]},
{muc_SUITE,'-hibernated_room_can_be_queried_for_archive/1-fun-0-',3,
[{file,"/home/circleci/project/big_tests/tests/muc_SUITE.erl"},
{line,4124}]},
{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,4120}]},
{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}]}]}} pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2225@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2225@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"W6T+fZ6QZLRbxbWhO5zxzw==">>}],
[{xmlel,<<"item">>,
[{<<"id">>,<<"salmon">>}],
[{xmlel,<<"entry">>,
[{<<"xmlns">>,
<<"http://www.w3.org/2005/Atom">>}],
[]}]}]}]},
{xmlel,<<"headers">>,
[{<<"xmlns">>,<<"http://jabber.org/protocol/shim">>}],
[]}]}]},
[{pep_SUITE,'-unsubscribe_after_presence_unsubscription/1-fun-0-',2,
[{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
{line,384}]},
{escalus_story,story,4,
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{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}]}]}} mssql_mnesia_25 / odbc_mssql_mnesia / cb6ae8f |
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.
Looks good 👍
This PR addresses MIM-1669 and implements the inbox category in GraphQL. The commands allow clearing the bin for the user, domain, or globally. I added a possibility to clear bin per domain because it fits perfectly for domain admin.
I didn't check if the inbox module is loaded because we are thinking about doing it outside the API modules.