From 1cfb680a2c3d859b0482f22e2eb08a432e40db13 Mon Sep 17 00:00:00 2001 From: Alma Armas Date: Sat, 18 Jul 2020 07:47:42 +0000 Subject: [PATCH] Modify Correspondence::sendMessage behaviour because current behaviour is useless and confusing --- Web/Models/Entities/Correspondence.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Web/Models/Entities/Correspondence.php b/Web/Models/Entities/Correspondence.php index 216df6a8..8b710876 100644 --- a/Web/Models/Entities/Correspondence.php +++ b/Web/Models/Entities/Correspondence.php @@ -110,7 +110,7 @@ class Correspondence } /** - * Send message as user, who is currently logged in. + * Send message. * * @deprecated * @returns Message|false - resulting message, or false in case of non-successful transaction @@ -122,7 +122,6 @@ class Correspondence $ids = [$this->correspondents[0]->getId(), $this->correspondents[1]->getId()]; $classes = [get_class($this->correspondents[0]), get_class($this->correspondents[1])]; - if(!in_array($user->getId(), $ids)) return false; if($ids[1] === $user->getId() && !$dontReverse) { $ids = array_reverse($ids); $classes = array_reverse($classes);