mirror of
https://github.com/Mibew/java.git
synced 2025-01-23 01:50:34 +03:00
Fix ability to change avatar
This commit is contained in:
parent
1528c610d7
commit
f1224a98ee
@ -238,8 +238,32 @@ class ThreadProcessor extends RequestProcessor {
|
|||||||
$messages = $thread->getMessages($is_user, $last_message_id);
|
$messages = $thread->getMessages($is_user, $last_message_id);
|
||||||
if (! empty($messages)) {
|
if (! empty($messages)) {
|
||||||
foreach($messages as $key => $msg) {
|
foreach($messages as $key => $msg) {
|
||||||
|
// Check if message is avatar
|
||||||
|
if ($msg['ikind'] == Thread::KIND_AVATAR) {
|
||||||
|
// Update avatar
|
||||||
|
$this->responses[] = array(
|
||||||
|
'token' => md5(time() . rand()),
|
||||||
|
'functions' => array(
|
||||||
|
array(
|
||||||
|
'function' => 'setupAvatar',
|
||||||
|
'arguments' => array(
|
||||||
|
'threadId' => $thread->id,
|
||||||
|
'token' => $thread->lastToken,
|
||||||
|
'return' => array(),
|
||||||
|
'references' => array(),
|
||||||
|
'imageLink' => $msg['tmessage']
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
unset($messages[$key]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Theme message
|
||||||
$messages[$key] = Thread::themeMessage($msg);
|
$messages[$key] = Thread::themeMessage($msg);
|
||||||
}
|
}
|
||||||
|
// Send messages
|
||||||
$this->responses[] = array(
|
$this->responses[] = array(
|
||||||
'token' => md5(time() . rand()),
|
'token' => md5(time() . rand()),
|
||||||
'functions' => array(
|
'functions' => array(
|
||||||
|
Loading…
Reference in New Issue
Block a user