Hi, I think I found 3 problems more or less related to the unread thread count:

Deleting an unread thread

  • User1 has a new message, and sees 1 unread thread in the privatemsg block.
  • User1 deletes the message from the messages view, BEFORE reading it (still marked as unread).
  • User1 still sees 1 unread thread (from this now inaccessible thread, User1 won't be able to get the count down to 0).

I guess threads are not marked as read when they are deleted, maybe they should be.

Leaving the chat - Part 1

  • User1 sends a message to User2 and User3.
  • User3 sees 1 unread thread in the privatemsg block.
  • User3 reads the thread and click on the "Leave Chat" button.
  • User3 sees 0 unread thread in the privatemsg block.
  • User1 (or User2) sends a new message in the same thread.
  • User3 sees now 1 unread thread (from this now inaccessible thread, User3 won't be able to get the count down to 0).

This is strange because User3 is not shown anymore in the thread participants...

Note: The same thing happens if User3 deletes the thread from the messages view (I guess it does more or less the same thing as Leave Chat).

Leaving the chat - Part 2

When it works: 2 participants

  • User1 sends a message to User2.
  • User2 deletes the thread.
  • User1 can't send a message in the thread anymore.

When it doesn't work: more than 2 participants

  • User1 sends a message to User2 and User3.
  • User2 deletes the thread (or leave the chat).
  • User3 deletes the thread.
  • User1 can still send a message in the thread.
  • User2 and User3 will have 1 unread, inacessible thread...

I wish I could help more, but I'm not really a "drupal pro coder"...

Issue fork privatemsg-3589253

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

lemartialou created an issue. See original summary.

ivnish’s picture

Your help is very useful! I'll check every case, thanks!

ivnish’s picture

Assigned: Unassigned » ivnish

  • ivnish committed 73dac94a on 2.0.x
    fix: #3589253 Unread count errors
    
    By: lemartialou
    By: ivnish
    
ivnish’s picture

Assigned: ivnish » Unassigned
Status: Active » Fixed

Fixed all cases. Could you test again?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

lemartialou’s picture

All right, I tested the different cases... and everything is working as expected now!
Once again: thank you very much for your great support! ^^

Status: Fixed » Closed (fixed)

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