mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +01:00
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:
parent
75303567b3
commit
6bf595b951
1 changed files with 7 additions and 2 deletions
|
@ -102,8 +102,13 @@ final class PhabricatorConpherenceProfileMenuItem
|
|||
return array();
|
||||
}
|
||||
|
||||
$data = $room->getDisplayData($viewer);
|
||||
$unread_count = $data['unread_count'];
|
||||
$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) {
|
||||
|
|
Loading…
Reference in a new issue