-
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 error handling in MUC Light #3881
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportBase: 83.15% // Head: 83.15% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3881 +/- ##
=======================================
Coverage 83.15% 83.15%
=======================================
Files 535 535
Lines 34202 34220 +18
=======================================
+ Hits 28440 28456 +16
- 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. |
f2030b0
to
b61863b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b61863b
to
0611c6f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0611c6f
to
e71240b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e71240b
to
c9e6ba8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
The goal is to handle the error cases: - Non-existing users shouldn't be room owners or message senders - 'Room not found' should be returned if the room does not exist Other functional changes: - Name and subject are not required, because they shouldn't be. They have defaults, and they can be removed in a custom config schema. - Only room owner should be able to kick room members. Operations are broken into reusable steps, and a fold operation is used to iterate over them.
- Handle the new error cases from the API module. - Pass name and subject in the config map. - Remove permission checking, which is done in mod_muc_light_api now.
- Update some operation names - Pass room name and subject in a map - Convert printed JIDs to binaries
- Protect 'mucDomain' on room creation. The reason is that a domain admin shouldn't be able to create a room at a different domain. The operation directly calls the MUC Light backend. - Room JID is always bare - Require 'mod_mam_muc' for message archive - Make name and subject optional, as they should be. they have default values, and the user could even remove them from the config schema.
- Run the archive-related tests with and without MAM - Test the new error conditions
Handle new error conditions.
c9e6ba8
to
9788b67
Compare
small_tests_24 / small_tests / 9788b67 small_tests_25 / small_tests / 9788b67 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 9788b67 ldap_mnesia_24 / ldap_mnesia / 9788b67 dynamic_domains_mysql_redis_25 / mysql_redis / 9788b67 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 9788b67 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 9788b67 internal_mnesia_25 / internal_mnesia / 9788b67 ldap_mnesia_25 / ldap_mnesia / 9788b67 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 9788b67 pgsql_mnesia_24 / pgsql_mnesia / 9788b67 riak_mnesia_24 / riak_mnesia / 9788b67 pgsql_mnesia_25 / pgsql_mnesia / 9788b67 mysql_redis_25 / mysql_redis / 9788b67 mssql_mnesia_25 / odbc_mssql_mnesia / 9788b67 pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription{error,
{{badmatch,
[{xmlel,<<"message">>,
[{<<"from">>,
<<"alice_unsubscribe_after_presence_unsubscription_2689@localhost">>},
{<<"to">>,
<<"bob_unsubscribe_after_presence_unsubscription_2689@localhost/res1">>},
{<<"type">>,<<"headline">>}],
[{xmlel,<<"event">>,
[{<<"xmlns">>,
<<"http://jabber.org/protocol/pubsub#event">>}],
[{xmlel,<<"items">>,
[{<<"node">>,<<"se0m0Ht6TC3DYzDnzrmKSQ==">>}],
[{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}]}]}} |
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
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 to me! 👍
The main goal is to handle the error cases:
Other functional changes:
Operations are broken into reusable steps, and a fold operation is used to iterate over them.