mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Added possibility for user transmission
This commit is contained in:
parent
530c2ab788
commit
22c2f481d5
@ -137,7 +137,7 @@ TimWolla.WCF ?= {}
|
||||
dataType: 'json'
|
||||
type: 'POST'
|
||||
success: $.proxy((data, textStatus, jqXHR) ->
|
||||
@handleMessages(data)
|
||||
@handleMessages(data.messages)
|
||||
, this)
|
||||
###
|
||||
# Inserts the new messages.
|
||||
|
@ -50,11 +50,12 @@ public function show() {
|
||||
parent::show();
|
||||
|
||||
@header('Content-type: application/json');
|
||||
$result = '[';
|
||||
$json = array('users' => array(), 'messages' => array());
|
||||
|
||||
foreach ($this->messages as $message) {
|
||||
$result .= $message->jsonify().',';
|
||||
$json['messages'][] = $message->jsonify(true);
|
||||
}
|
||||
echo rtrim($result, ',').']';
|
||||
echo \wcf\util\JSON::encode($json);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user