/** * @return bool|null */ public function isGroupChatMessage() { if ($this->from->getId() != $this->user->getId()) { return true; } else { return false; } }
public function __toString() : string { $groupChatId = $this->groupChat->getId(); $userId = $this->user->getId(); return "chat:{$groupChatId};user:{$userId}"; }