diff --git a/file/lib/data/message/Message.class.php b/file/lib/data/message/Message.class.php index 809ea20..ab59b6b 100644 --- a/file/lib/data/message/Message.class.php +++ b/file/lib/data/message/Message.class.php @@ -142,12 +142,16 @@ public function getUsername($colored = false) { * @return string */ public function jsonify($raw = false) { + $additionalData = $this->additionalData; switch ($this->type) { case self::TYPE_WHISPER: case self::TYPE_NORMAL: case self::TYPE_INFORMATION: $separator = ':'; break; + case self::TYPE_JOIN: + unset($additionalData['ipAddress']); + break; default: $separator = ''; break; @@ -168,7 +172,7 @@ public function jsonify($raw = false) { 'type' => (int) $this->type, 'roomID' => (int) $this->roomID, 'messageID' => (int) $this->messageID, - 'additionalData' => $this->additionalData + 'additionalData' => $additionalData ); if ($raw) return $array;