Skip to content

Added in setting allowing users to only allow people they sub to, to contact them.

Ben requested to merge feat/messenger-spam-protection-3517 into master

Closes #3517 (closed) Depends on engine!606 (merged)

Summary

We don't use the multi-participant conversations right now so there is only one other participant, that said the code is written to only allows a user to message another user:

  • If any other single participant in the conversation is a subscriber,
  • If any other single participant in the conversation explicitly allows contact from other users in their settings
  • If there is existing conversation history (so we don't cut off users mid-conversation)

Steps to test

Testing 2 blank users
  1. Login to User A and User B in separate browsers.
  2. Ensure these users are not subscribed to each other.
  3. Have User A try to message User b - should see no message input and a message explaining you cannot message them.
  4. Have User B try to message User A - should see the same as above.
Testing the allow option in settings
  1. Go to your settings on User A in another tab, go to account > messenger.
  2. Turn on the option to allow other users to message you.
  3. Refresh User B - don't post a message yet, but you should see the message input there ready.
Testing that without it, you can only message if subscribed
  1. Turn off the option to allow other users to message you again on User A
  2. Refresh User B, the message input should be gone.
  3. Subscribe to User B with User A
  4. Refresh User B, try sending a message, ensure its received.
Unsubscribe again, chat should remain
  1. Unsubscribe from User B with User A
  2. Refresh User B - you should still be able to message.

Estimated Regression Scope

Changes permissions allowing users to message one-another.

Merge request reports