Problem/Motivation

Hi,

In a 3 member thread, and when blocking mode is passive:

When user 3 bans user 2, the user 3 does not have access to that thread anymore.
When user 1 and user 2 continues sending messages in that same thread, user 3
is getting in the Private Message Notification -block more notifications of unread messages.
When user 3 clicks the Private Message Notification -block which is showing a number of new messages,
there is nothing to see.

Maybe the one who bans any user in a thread, should himself be removed from the threads where this banned
user is?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anaconda777 created an issue. See original summary.

dxvargas’s picture

Assigned: Unassigned » dxvargas

I am also experiencing a similar situation. in my case, only with two users. When the banned user 2 sends a message to "banning" user 1, the user 1 gets the new message notification.

For now I think we should use the same approach as in the threads notification and filter out messages in threads that have the banned user.

I don't think we should remove the "banning" user 1 from the notifications. Because if that users removes the ban, he should get access again to the threads.

dxvargas’s picture

Status: Active » Needs work

I have created a MR with a fix.

But I let the issue in status "Needs work".
The tests are failing (I don't think it's related with my changes).
We need to test also if like this the notifications by email are also prevented.
Maybe some tests?

dxvargas’s picture

Assigned: dxvargas » Unassigned

alorenc made their first commit to this issue’s fork.

alorenc’s picture

alorenc’s picture

Tests were falling due to #3488863
Yes, I think we need to provide a test for this issue.

dxvargas’s picture

Status: Needs work » Needs review

I have enhanced the existing Functional JavaScript test testNotifications() to test a banned user.
Moving to Needs review.

claudiu.cristea’s picture

Version: 3.0.2 » 4.x-dev
Issue tags: +Needs backport to 3.0.x

We've opened the 4.x branch. Each new fix/feature should be be filled against the highest branch. After merging we'll decide whether it makes sense to backport to 3.0.x

dxvargas’s picture

Status: Needs review » Needs work

I did the changes for 4.x. But it still needs the tests.

dxvargas’s picture

Status: Needs work » Needs review

I put a test in place for this. It's ready for review.

claudiu.cristea’s picture

Category: Support request » Bug report
Status: Needs review » Reviewed & tested by the community

claudiu.cristea’s picture

Version: 4.x-dev » 3.0.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Merged in 4.x. Thank you!

Now this needs some work to be backported to 3.0x.

dxvargas’s picture

I've prepared the MR for 3.0.x .

claudiu.cristea’s picture

Status: Patch (to be ported) » Fixed
Issue tags: -Needs backport to 3.0.x

Thanks. Merged

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.