From 76c9971c31115801a1d2e8f66d6f521c28d632a4 Mon Sep 17 00:00:00 2001 From: Chimo Date: Sat, 6 Jun 2015 13:49:16 -0400 Subject: [PATCH] Show nickname if user has oldschool option enabled --- lib/toselector.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/toselector.php b/lib/toselector.php index 4c0bda3312..566b6a0f29 100644 --- a/lib/toselector.php +++ b/lib/toselector.php @@ -102,12 +102,16 @@ class ToSelector extends Widget $choices[$value] = $groups->getBestName(); } - // Add subscribed users to dropdown menu - $users = $this->user->getSubscribed(); - while ($users->fetch()) { - $value = 'profile:'.$users->id; - $choices[$value] = $users->getBestName(); - } + // Add subscribed users to dropdown menu + $users = $this->user->getSubscribed(); + while ($users->fetch()) { + $value = 'profile:'.$users->id; + if ($this->user->streamNicknames()) { + $choices[$value] = $users->getNickname(); + } else { + $choices[$value] = $users->getBestName(); + } + } if ($this->to instanceof Profile) { $value = 'profile:'.$this->to->id;