1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Conpherence - make solo conversations be titled with viewer's name

Summary: Fixes T8251. I think this used to be "lucky handle" when it was all one giant terrible function, so restore previous functionality and have the title be the viewer's name in this case.

Test Plan: rocked a solo conpherence and saw my username as the title

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8251

Differential Revision: https://secure.phabricator.com/D12935
This commit is contained in:
Bob Trahan 2015-05-19 13:20:04 -07:00
parent 3845057efb
commit 596db64ee6

View file

@ -231,9 +231,14 @@ final class ConpherenceThread extends ConpherenceDAO
$handles = $this->getHandles();
$phids = $this->getOtherRecentParticipantPHIDs($viewer);
$limit = 3;
$more = (count($phids) > $limit);
$phids = array_slice($phids, 0, $limit);
if (count($phids) == 0) {
$phids[] = $viewer->getPHID();
$more = false;
} else {
$limit = 3;
$more = (count($phids) > $limit);
$phids = array_slice($phids, 0, $limit);
}
$names = array_select_keys($handles, $phids);
$names = mpull($names, 'getName');