Yep. And it may cascade from other areas to there because in the creator, that error comes up when there are no recipients entered.Possibly in,XF/Service/Conversation/Creator.php
getValidatedRecipients in XF/Repository/Conversation.php if (is_array($users))
{
if (count($users) === 1 && reset($users) === $from)
{
$error = \XF::phraseDeferred('you_cannot_start_conversation_with_yourself');
return [];
}
}
else if ($users instanceof \XF\Mvc\Entity\ArrayCollection)
{
if ($users->count() === 1 && $users->first() === $from)
{
$error = \XF::phraseDeferred('you_cannot_start_conversation_with_yourself');
return [];
}
}
if (is_array($users))
{
if (count($users) === 1 && reset($users) === $from)
{
return [];
}
}
else if ($users instanceof \XF\Mvc\Entity\ArrayCollection)
{
if ($users->count() === 1 && $users->first() === $from)
{
return [];
}
}
XF/Service/Conversation/Creator.php change the function _validate if (!$this->recipients)
{
$this->conversation->error(\XF::phrase('please_enter_at_least_one_valid_recipient'), 'recipients', false);
}
if (!$this->recipients && !$this->starter)
{
$this->conversation->error(\XF::phrase('please_enter_at_least_one_valid_recipient'), 'recipients', false);
}
_saveTo this:
[code=php] if (!$this->recipients && !$this->starter)
{
throw new \LogicException("A conversation must have at least one recipient");
}
You could check what errors are added, and then check to see if one of the errors is the one for starting a conversation with yourself (the 'please_enter_at_least_one_valid_recipient' phrase). If so, remove it.It's another one of those sticky situations where I don't feel comfortable making the final call. But I'm going to guess this wouldn't be allowed. (could be wrong)![]()
We use essential cookies to make this site work, and optional cookies to enhance your experience.