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

Do not store message sent to yourself #3859

Merged

Conversation

arcusfelis
Copy link
Contributor

When client sends a message to yourself (for making notes, fo r example), we store the message twice. We should store only once.

This PR addresses MIM-1707 #3294 (comment)

Proposed changes include:

  • Store only outgoing packet.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Nov 16, 2022

small_tests_24 / small_tests / 775f706
Reports root / small


small_tests_25 / small_tests / 775f706
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 775f706
Reports root/ big
OK: 2131 / Failed: 0 / User-skipped: 792 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 775f706
Reports root/ big
OK: 4052 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / 775f706
Reports root/ big
OK: 2131 / Failed: 0 / User-skipped: 792 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 775f706
Reports root/ big
OK: 4052 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / 775f706
Reports root/ big
OK: 4026 / Failed: 0 / User-skipped: 114 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 775f706
Reports root/ big
OK: 4052 / Failed: 0 / User-skipped: 88 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 775f706
Reports root/ big
OK: 4426 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 775f706
Reports root/ big
OK: 2617 / Failed: 0 / User-skipped: 645 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / 775f706
Reports root/ big
OK: 2271 / Failed: 0 / User-skipped: 652 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 775f706
Reports root/ big
OK: 2461 / Failed: 0 / User-skipped: 631 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / 775f706
Reports root/ big
OK: 4426 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / 775f706
Reports root/ big
OK: 4412 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / 775f706
Reports root/ big
OK: 4426 / Failed: 0 / User-skipped: 97 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Base: 83.08% // Head: 83.09% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (775f706) compared to base (1b95b64).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3859   +/-   ##
=======================================
  Coverage   83.08%   83.09%           
=======================================
  Files         535      535           
  Lines       34125    34128    +3     
=======================================
+ Hits        28354    28359    +5     
+ Misses       5771     5769    -2     
Impacted Files Coverage Δ
src/mam/mod_mam_pm.erl 89.24% <100.00%> (+0.13%) ⬆️
src/ejabberd.erl 45.00% <0.00%> (-10.00%) ⬇️
src/muc_light/mod_muc_light_db_mnesia.erl 91.57% <0.00%> (-1.06%) ⬇️
src/pubsub/mod_pubsub.erl 73.04% <0.00%> (-0.19%) ⬇️
src/mod_muc_log.erl 62.82% <0.00%> (ø)
src/ejabberd_c2s.erl 89.02% <0.00%> (+0.07%) ⬆️
src/pubsub/mod_pubsub_db_rdbms.erl 95.34% <0.00%> (+0.25%) ⬆️
src/pubsub/mod_pubsub_db_mnesia.erl 92.82% <0.00%> (+0.42%) ⬆️
src/rdbms/mongoose_rdbms.erl 67.01% <0.00%> (+0.70%) ⬆️
src/pubsub/node_pep.erl 79.62% <0.00%> (+1.85%) ⬆️
... and 2 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@DenysGonchar DenysGonchar merged commit eec76fe into master Nov 16, 2022
@DenysGonchar DenysGonchar deleted the mu-mam-dont-archive-duplicate-when-sending-to-yourself3 branch November 16, 2022 11:07
@chrzaszcz chrzaszcz added this to the 6.0.0 milestone Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants