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

[WIP] event_pusher check if the recipient is not a room #3551

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gustawlippa
Copy link
Contributor

Just want to see if this passes on CI

@codecov
Copy link

codecov bot commented Feb 18, 2022

Codecov Report

Merging #3551 (ef5ac52) into master (a89e2ec) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3551      +/-   ##
==========================================
- Coverage   79.26%   79.21%   -0.06%     
==========================================
  Files         420      420              
  Lines       32266    32269       +3     
==========================================
- Hits        25577    25563      -14     
- Misses       6689     6706      +17     
Impacted Files Coverage Δ
src/mongoose_lib.erl 87.32% <ø> (ø)
.../event_pusher/mod_event_pusher_hook_translator.erl 89.47% <100.00%> (+0.90%) ⬆️
src/event_pusher/mod_event_pusher.erl 65.00% <0.00%> (-22.50%) ⬇️
src/mam/mod_mam_rdbms_arch_async.erl 96.62% <0.00%> (-1.13%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.43% <0.00%> (-0.43%) ⬇️
src/pubsub/mod_pubsub.erl 73.19% <0.00%> (-0.42%) ⬇️
src/ejabberd_sm.erl 84.59% <0.00%> (-0.33%) ⬇️
src/mod_muc_room.erl 76.97% <0.00%> (-0.29%) ⬇️
src/mod_muc_log.erl 78.11% <0.00%> (ø)
src/ejabberd_c2s.erl 88.75% <0.00%> (+0.07%) ⬆️
... and 4 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 a89e2ec...ef5ac52. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Feb 18, 2022

small_tests_24 / small_tests / ef5ac52
Reports root / small


small_tests_23 / small_tests / ef5ac52
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / ef5ac52
Reports root/ big
OK: 2704 / Failed: 0 / User-skipped: 256 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / ef5ac52
Reports root/ big
OK: 2721 / Failed: 0 / User-skipped: 239 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / ef5ac52
Reports root/ big
OK: 2721 / Failed: 0 / User-skipped: 239 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / ef5ac52
Reports root/ big
OK: 2721 / Failed: 0 / User-skipped: 239 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / ef5ac52
Reports root/ big
OK: 1510 / Failed: 0 / User-skipped: 390 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / ef5ac52
Reports root/ big
OK: 1510 / Failed: 0 / User-skipped: 390 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / ef5ac52
Reports root/ big
OK: 1551 / Failed: 0 / User-skipped: 349 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / ef5ac52
Reports root/ big
OK: 1685 / Failed: 0 / User-skipped: 369 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / ef5ac52
Reports root/ big
OK: 3095 / Failed: 0 / User-skipped: 248 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / ef5ac52
Reports root/ big
OK: 3090 / Failed: 0 / User-skipped: 253 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / ef5ac52
Reports root/ big
OK: 3095 / Failed: 0 / User-skipped: 248 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / ef5ac52
Reports root/ big
OK: 3095 / Failed: 0 / User-skipped: 248 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / ef5ac52
Reports root/ big
OK: 1690 / Failed: 0 / User-skipped: 364 / Auto-skipped: 0

from = From, to = To, packet = Packet},
NewAcc = mod_event_pusher:push_event(Acc0, Host, Event),
merge_acc(Acc0, NewAcc)
case mongoose_lib:is_to_room(To) of
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, Type is the message type, that is, it can be the atom groupchat, so you might as well filter there too, you might want to call is_to_room only if the message is actually to a groupchat.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, true

@gustawlippa
Copy link
Contributor Author

Todo: compare whether #3526 is not a better solution.
When merged, either of them should fix #3407.

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

3 participants