- Affected version
- 2.2.6
Conversation::recipientRemoved requires the User relationship which is a key'ed FinderCollection to be loaded with all records, except if the conversation was loading with a finder Conversation.User|{$userId} this can result in the recipientRemoved function unexpectedly deleting the conversation.It looks like the fix is simple;
PHP:
/** @var \XF\Mvc\Entity\FinderCollection $users */
$users = $this->Users;
$users->populate();
$users->forceRemove($recipient->user_id);
This thankfully can't happen with stock configuration, but add-ons could easily tickle this behaviour without meaning to.
Last edited: