Check is viewer is a participant before showing count
Summary: In Conpherence ProfileMenuItem we show an unread count if you're a participant, but all message count if you're not. Just remove that. Test Plan: Log out of room in Conpherence, leave messages on second account, check menu item on both accounts. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17664
This commit is contained in:
@@ -102,8 +102,13 @@ final class PhabricatorConpherenceProfileMenuItem
|
||||
return array();
|
||||
}
|
||||
|
||||
$participants = $room->getParticipants();
|
||||
$viewer_phid = $viewer->getPHID();
|
||||
$unread_count = null;
|
||||
if (isset($participants[$viewer_phid])) {
|
||||
$data = $room->getDisplayData($viewer);
|
||||
$unread_count = $data['unread_count'];
|
||||
}
|
||||
|
||||
$count = null;
|
||||
if ($unread_count) {
|
||||
|
||||
Reference in New Issue
Block a user