messages_mark_thread_read – illogical?
-
Hello,
I spent an hour or two debugging a weird issue for my client yesterday, and I have finally found the culprit –
messages_mark_thread_read
Client was using a theme (woffice) that offers a live chat functionality (by basically displaying buddypress threads in a chat format). The problem was that, when someone would view someone else’s profile, and have a chat open at the same time, instead of marking that thread as read for him, it would instead mark it as read for that person.
Why?
Because
messages_mark_thread_read
first checkes whether a user is displayed, and then clears theunread_count
` for that user, only falling back to a logged in user if no user is being displayed currently.I was wondering why is that so?
Thanks,
Ante
- You must be logged in to reply to this topic.