Added in setting allowing users to only allow people they sub to, to contact them.
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
- Login to User A and User B in separate browsers.
- Ensure these users are not subscribed to each other.
- Have User A try to message User b - should see no message input and a message explaining you cannot message them.
- Have User B try to message User A - should see the same as above.
Testing the allow option in settings
- Go to your settings on User A in another tab, go to account > messenger.
- Turn on the option to allow other users to message you.
- 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
- Turn off the option to allow other users to message you again on User A
- Refresh User B, the message input should be gone.
- Subscribe to User B with User A
- Refresh User B, try sending a message, ensure its received.
Unsubscribe again, chat should remain
- Unsubscribe from User B with User A
- Refresh User B - you should still be able to message.
Estimated Regression Scope
Changes permissions allowing users to message one-another.