[buddypress-trac] [BuddyPress Trac] #8426: Update queries when new message notifications mark as read

buddypress-trac noreply at wordpress.org
Fri Sep 10 07:36:35 UTC 2021


#8426: Update queries when new message notifications mark as read
--------------------------+---------------------
 Reporter:  oztaser       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  10.0.0
Component:  Messages      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------

Comment (by oztaser):

 Please ignore the query suggestion part. I was thinking
 `secondary_item_id` is `thread_id` but it is not :(

 I've written new query. It finds message id by `thread_id` and `sender_id`
 from `bp_messages_messages` table. What you think about my new query? I
 think we get closer the solution, what you think?

 {{{
  update wp_bp_notifications set is_new = 0 where user_id =
 {current_user_id} and component_action='new_message' and is_new = 1 and
 item_id in (select id from wp_bp_messages_messages where thread_id =
 {$thread_message->thread_id} and sender_id={$thread_message->sender_id});
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8426#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list