From 9edff6cc5c0ac1c5127499663a010bb723ebacca Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 28 Apr 2018 11:38:01 -0400 Subject: [PATCH] Add exception for self-contact in item_joins() --- include/conversation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index bd3481670e..85f6547340 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -471,7 +471,7 @@ These Fields are not added below (yet). They are here to for bug search. */ function item_joins() { return sprintf("STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id` - AND `contact`.`rel` IN (%s, %s) + AND (`contact`.`rel` IN (%s, %s) OR `contact`.`self`) AND NOT (`contact`.`blocked` OR `contact`.`readonly` OR `contact`.`pending`) LEFT JOIN `contact` AS `author` ON `author`.`id`=`item`.`author-id` LEFT JOIN `contact` AS `owner` ON `owner`.`id`=`item`.`owner-id`