1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Merge branch '3.0.x'

This commit is contained in:
Tim Düsterhus 2016-08-17 20:36:39 +02:00
commit 73680786d3

View File

@ -142,12 +142,16 @@ public function getUsername($colored = false) {
* @return string * @return string
*/ */
public function jsonify($raw = false) { public function jsonify($raw = false) {
$additionalData = $this->additionalData;
switch ($this->type) { switch ($this->type) {
case self::TYPE_WHISPER: case self::TYPE_WHISPER:
case self::TYPE_NORMAL: case self::TYPE_NORMAL:
case self::TYPE_INFORMATION: case self::TYPE_INFORMATION:
$separator = ':'; $separator = ':';
break; break;
case self::TYPE_JOIN:
unset($additionalData['ipAddress']);
break;
default: default:
$separator = ''; $separator = '';
break; break;
@ -168,7 +172,7 @@ public function jsonify($raw = false) {
'type' => (int) $this->type, 'type' => (int) $this->type,
'roomID' => (int) $this->roomID, 'roomID' => (int) $this->roomID,
'messageID' => (int) $this->messageID, 'messageID' => (int) $this->messageID,
'additionalData' => $this->additionalData 'additionalData' => $additionalData
); );
if ($raw) return $array; if ($raw) return $array;