function handle($channel)
{
try {
- $other = $this->getUser($this->other);
+ $other = $this->getUser($this->other)->getProfile();
} catch (CommandException $e) {
try {
$profile = $this->getProfile($this->other);
return;
}
- if (!$other) {
+ if (!$other instanceof Profile) {
// TRANS: Error text shown when trying to send a direct message to a user that does not exist.
$channel->error($this->user, _('No such user.'));
return;
$target = $this->getProfile($this->other);
- $remote = Remote_profile::getKV('id', $target->id);
- if ($remote) {
- // TRANS: Command exception text shown when trying to subscribe to an OMB profile using the subscribe command.
- throw new CommandException(_("Can't subscribe to OMB profiles by command."));
- }
-
try {
Subscription::start($this->user->getProfile(), $target);
// TRANS: Text shown after having subscribed to another user successfully.
{
$group = $this->user->getGroups();
$groups=array();
- while ($group->fetch()) {
+ while ($group instanceof User_group && $group->fetch()) {
$groups[]=$group->nickname;
}
if(count($groups)==0){