Línea 132... |
Línea 132... |
132 |
$users = $userMapper->fetchAllByIds($userIds);
|
132 |
$users = $userMapper->fetchAllByIds($userIds);
|
Línea 133... |
Línea 133... |
133 |
|
133 |
|
134 |
foreach ($users as $user) {
|
134 |
foreach ($users as $user) {
|
135 |
$username = trim($user->first_name . ' ' . $user->last_name);
|
135 |
$username = trim($user->first_name . ' ' . $user->last_name);
|
136 |
$status = $user->online ? 'LABEL_ONLINE' : 'LABEL_OFFLINE';
|
136 |
$status = $user->online ? 'LABEL_ONLINE' : 'LABEL_OFFLINE';
|
Línea 137... |
Línea 137... |
137 |
$user_image = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]);
|
137 |
$user_image = $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image],['force_canonical' => true]);
|
138 |
|
138 |
|
139 |
array_push($contacts, ['id' => $user->uuid, 'status' => $status, 'name' => $username, 'image' => $user_image]);
|
139 |
array_push($contacts, ['id' => $user->uuid, 'status' => $status, 'name' => $username, 'image' => $user_image],['force_canonical' => true]);
|
Línea 140... |
Línea 140... |
140 |
}
|
140 |
}
|
141 |
}
|
141 |
}
|
Línea 458... |
Línea 458... |
458 |
'url_mark_received' => $this->url()->fromRoute('chat/mark-received', ['id' => $user->uuid]),
|
458 |
'url_mark_received' => $this->url()->fromRoute('chat/mark-received', ['id' => $user->uuid]),
|
459 |
'url_get_all_messages' => $this->url()->fromRoute('chat/get-all-messages', ['id' => $user->uuid]),
|
459 |
'url_get_all_messages' => $this->url()->fromRoute('chat/get-all-messages', ['id' => $user->uuid]),
|
460 |
'url_zoom' => $this->url()->fromRoute('chat/zoom', ['id' => $user->uuid, 'type' => 'chat']),
|
460 |
'url_zoom' => $this->url()->fromRoute('chat/zoom', ['id' => $user->uuid, 'type' => 'chat']),
|
461 |
'id' => $user->uuid,
|
461 |
'id' => $user->uuid,
|
462 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
462 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
463 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image]),
|
463 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image],['force_canonical' => true]),
|
464 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
464 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid],['force_canonical' => true]),
|
465 |
'type' => 'user',
|
465 |
'type' => 'user',
|
466 |
'online' => $user->online ? 1 : 0,
|
466 |
'online' => $user->online ? 1 : 0,
|
467 |
'is_open' => $is_open ? 1 : 0,
|
467 |
'is_open' => $is_open ? 1 : 0,
|
468 |
'not_seen_messages' => $not_seen_messages,
|
468 |
'not_seen_messages' => $not_seen_messages,
|
469 |
'not_received_messages' => $not_received_messages,
|
469 |
'not_received_messages' => $not_received_messages,
|
Línea 753... |
Línea 753... |
753 |
'success' => true,
|
753 |
'success' => true,
|
754 |
'data' => [
|
754 |
'data' => [
|
755 |
'url_remove_from_group' => $this->url()->fromRoute('chat/remove-user-from-group', ['group_id' => $chatGroup->uuid, 'user_id' => $user->uuid]),
|
755 |
'url_remove_from_group' => $this->url()->fromRoute('chat/remove-user-from-group', ['group_id' => $chatGroup->uuid, 'user_id' => $user->uuid]),
|
756 |
'id' => $user->uuid,
|
756 |
'id' => $user->uuid,
|
757 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
757 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
758 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image]),
|
758 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image],['force_canonical' => true]),
|
759 |
'type' => 'user',
|
759 |
'type' => 'user',
|
760 |
'online' => $user->online ? 1 : 0,
|
760 |
'online' => $user->online ? 1 : 0,
|
761 |
]
|
761 |
]
|
762 |
]);
|
762 |
]);
|
763 |
} else {
|
763 |
} else {
|
Línea 1003... |
Línea 1003... |
1003 |
|
1003 |
|
1004 |
$pic_from = $this->url()->fromRoute('storage', [
|
1004 |
$pic_from = $this->url()->fromRoute('storage', [
|
1005 |
'code' => $userdata_from->uuid,
|
1005 |
'code' => $userdata_from->uuid,
|
1006 |
'type' => 'user',
|
1006 |
'type' => 'user',
|
1007 |
'filename' => $userdata_from->image
|
1007 |
'filename' => $userdata_from->image
|
1008 |
]);
|
1008 |
],['force_canonical' => true]);
|
1009 |
$u = $userdata_from->id == $currentUser->id ? 1 : 2;
|
1009 |
$u = $userdata_from->id == $currentUser->id ? 1 : 2;
|
1010 |
if ($m->type == ChatGroupMessage::TYPE_TEXT) {
|
1010 |
if ($m->type == ChatGroupMessage::TYPE_TEXT) {
|
1011 |
$content = $this->sanitize($m->content);
|
1011 |
$content = $this->sanitize($m->content);
|
1012 |
} else {
|
1012 |
} else {
|
1013 |
$content = $this->url()->fromRoute('storage', ['code' => $chatGroup->uuid, 'type' => 'chat', 'filename' => $m->content]);
|
1013 |
$content = $this->url()->fromRoute('storage', ['code' => $chatGroup->uuid, 'type' => 'chat', 'filename' => $m->content],['force_canonical' => true]);
|
Línea 1014... |
Línea 1014... |
1014 |
}
|
1014 |
}
|
Línea 1075... |
Línea 1075... |
1075 |
|
1075 |
|
1076 |
$pic_from = $this->url()->fromRoute('storage', [
|
1076 |
$pic_from = $this->url()->fromRoute('storage', [
|
1077 |
'code' => $userdata_from->uuid,
|
1077 |
'code' => $userdata_from->uuid,
|
1078 |
'type' => 'user',
|
1078 |
'type' => 'user',
|
1079 |
'filename' => $userdata_from->image
|
1079 |
'filename' => $userdata_from->image
|
Línea 1080... |
Línea 1080... |
1080 |
]);
|
1080 |
],['force_canonical' => true]);
|
1081 |
|
1081 |
|
1082 |
if (isset($users[$to_id])) {
|
1082 |
if (isset($users[$to_id])) {
|
1083 |
$userdata_to = $users[$to_id];
|
1083 |
$userdata_to = $users[$to_id];
|
Línea 1095... |
Línea 1095... |
1095 |
|
1095 |
|
1096 |
|
1096 |
|
1097 |
if ($m->type == ChatMessage::TYPE_TEXT) {
|
1097 |
if ($m->type == ChatMessage::TYPE_TEXT) {
|
1098 |
$content = $this->sanitize($m->content);
|
1098 |
$content = $this->sanitize($m->content);
|
1099 |
} else {
|
1099 |
} else {
|
Línea 1100... |
Línea 1100... |
1100 |
$content = $this->url()->fromRoute('storage', ['code' => $chatUser->uuid, 'type' => 'chat', 'filename' => $m->content]);
|
1100 |
$content = $this->url()->fromRoute('storage', ['code' => $chatUser->uuid, 'type' => 'chat', 'filename' => $m->content],['force_canonical' => true]);
|
1101 |
}
|
1101 |
}
|
1102 |
|
1102 |
|
Línea 1316... |
Línea 1316... |
1316 |
$sender_name = trim($sender_result->first_name . ' ' . $sender_result->last_name);
|
1316 |
$sender_name = trim($sender_result->first_name . ' ' . $sender_result->last_name);
|
1317 |
$sender_pic = $this->url()->fromRoute('storage', [
|
1317 |
$sender_pic = $this->url()->fromRoute('storage', [
|
1318 |
'code' => $sender_result->uuid,
|
1318 |
'code' => $sender_result->uuid,
|
1319 |
'type' => 'user',
|
1319 |
'type' => 'user',
|
1320 |
'filename' => $sender_result->image
|
1320 |
'filename' => $sender_result->image
|
1321 |
]);
|
1321 |
],['force_canonical' => true]);
|
Línea 1322... |
Línea 1322... |
1322 |
|
1322 |
|
1323 |
$chatGroupMapper = ChatGroupMapper::getInstance($this->adapter);
|
1323 |
$chatGroupMapper = ChatGroupMapper::getInstance($this->adapter);
|
1324 |
$chatGroup = $chatGroupMapper->fetchOneByUuid($id);
|
1324 |
$chatGroup = $chatGroupMapper->fetchOneByUuid($id);
|
Línea 1618... |
Línea 1618... |
1618 |
$name = trim($user->first_name . ' ' . $user->last_name);
|
1618 |
$name = trim($user->first_name . ' ' . $user->last_name);
|
1619 |
$image = $this->url()->fromRoute('storage', [
|
1619 |
$image = $this->url()->fromRoute('storage', [
|
1620 |
'code' => $user->uuid,
|
1620 |
'code' => $user->uuid,
|
1621 |
'type' => 'user',
|
1621 |
'type' => 'user',
|
1622 |
'filename' => $user->image
|
1622 |
'filename' => $user->image
|
1623 |
]);
|
1623 |
],['force_canonical' => true]);
|
Línea 1624... |
Línea 1624... |
1624 |
|
1624 |
|
1625 |
|
1625 |
|
1626 |
array_push($items, [
|
1626 |
array_push($items, [
|
Línea 1735... |
Línea 1735... |
1735 |
$name = trim($user->first_name . ' ' . $user->last_name);
|
1735 |
$name = trim($user->first_name . ' ' . $user->last_name);
|
1736 |
$image = $this->url()->fromRoute('storage', [
|
1736 |
$image = $this->url()->fromRoute('storage', [
|
1737 |
'code' => $user->uuid,
|
1737 |
'code' => $user->uuid,
|
1738 |
'type' => 'user',
|
1738 |
'type' => 'user',
|
1739 |
'filename' => $user->image
|
1739 |
'filename' => $user->image
|
1740 |
]);
|
1740 |
],['force_canonical' => true]);
|
Línea 1741... |
Línea 1741... |
1741 |
|
1741 |
|
1742 |
|
1742 |
|
1743 |
if ($chatGroupUser->owner == ChatGroupUser::OWNER_YES) {
|
1743 |
if ($chatGroupUser->owner == ChatGroupUser::OWNER_YES) {
|
Línea 2186... |
Línea 2186... |
2186 |
'url_mark_received' => $this->url()->fromRoute('chat/mark-received', ['id' => $user->uuid]),
|
2186 |
'url_mark_received' => $this->url()->fromRoute('chat/mark-received', ['id' => $user->uuid]),
|
2187 |
'url_get_all_messages' => $this->url()->fromRoute('chat/get-all-messages', ['id' => $user->uuid]),
|
2187 |
'url_get_all_messages' => $this->url()->fromRoute('chat/get-all-messages', ['id' => $user->uuid]),
|
2188 |
'url_zoom' => $this->url()->fromRoute('chat/zoom', ['id' => $user->uuid, 'type' => 'chat']),
|
2188 |
'url_zoom' => $this->url()->fromRoute('chat/zoom', ['id' => $user->uuid, 'type' => 'chat']),
|
2189 |
'id' => $user->uuid,
|
2189 |
'id' => $user->uuid,
|
2190 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
2190 |
'name' => trim($user->first_name . ' ' . $user->last_name),
|
2191 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image]),
|
2191 |
'image' => $this->url()->fromRoute('storage', ['code' => $user->uuid, 'type' => 'user', 'filename' => $user->image],['force_canonical' => true]),
|
2192 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
2192 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
2193 |
'type' => 'user',
|
2193 |
'type' => 'user',
|
2194 |
'online' => $user->online ? 1 : 0,
|
2194 |
'online' => $user->online ? 1 : 0,
|
2195 |
'is_open' => $is_open ? 1 : 0,
|
2195 |
'is_open' => $is_open ? 1 : 0,
|
2196 |
'not_seen_messages' => $not_seen_messages,
|
2196 |
'not_seen_messages' => $not_seen_messages,
|
Línea 2356... |
Línea 2356... |
2356 |
$sender_from = trim($sender_result->first_name . ' ' . $sender_result->last_name);
|
2356 |
$sender_from = trim($sender_result->first_name . ' ' . $sender_result->last_name);
|
2357 |
$sender_pic = $this->url()->fromRoute('storage', [
|
2357 |
$sender_pic = $this->url()->fromRoute('storage', [
|
2358 |
'code' => $sender_result->uuid,
|
2358 |
'code' => $sender_result->uuid,
|
2359 |
'type' => 'user',
|
2359 |
'type' => 'user',
|
2360 |
'filename' => $sender_result->image
|
2360 |
'filename' => $sender_result->image
|
2361 |
]);
|
2361 |
],['force_canonical' => true]);
|
Línea 2362... |
Línea 2362... |
2362 |
|
2362 |
|
2363 |
$chatGroupMapper = ChatGroupMapper::getInstance($this->adapter);
|
2363 |
$chatGroupMapper = ChatGroupMapper::getInstance($this->adapter);
|
2364 |
$chatGroup = $chatGroupMapper->fetchOneByUuid($id);
|
2364 |
$chatGroup = $chatGroupMapper->fetchOneByUuid($id);
|
Línea 2460... |
Línea 2460... |
2460 |
'user_name' => $sender_from,
|
2460 |
'user_name' => $sender_from,
|
2461 |
'user_id' => $currentUser->uuid,
|
2461 |
'user_id' => $currentUser->uuid,
|
2462 |
'user_image' => $sender_pic,
|
2462 |
'user_image' => $sender_pic,
|
2463 |
'u' => 1,
|
2463 |
'u' => 1,
|
2464 |
'mtype' => $file_type,
|
2464 |
'mtype' => $file_type,
|
2465 |
'm' => $this->url()->fromRoute('storage', ['code' => $chatGroup->uuid, 'type' => 'chat', 'filename' => $filename]),
|
2465 |
'm' => $this->url()->fromRoute('storage', ['code' => $chatGroup->uuid, 'type' => 'chat', 'filename' => $filename],['force_canonical' => true]),
|
2466 |
'time' => $msgtime,
|
2466 |
'time' => $msgtime,
|
2467 |
'id' => $chatGroupMessage->uuid
|
2467 |
'id' => $chatGroupMessage->uuid
|
2468 |
]
|
2468 |
]
|
2469 |
]);
|
2469 |
]);
|
2470 |
} else {
|
2470 |
} else {
|
Línea 2532... |
Línea 2532... |
2532 |
'user_name' => $sender_from,
|
2532 |
'user_name' => $sender_from,
|
2533 |
'user_id' => $currentUser->uuid,
|
2533 |
'user_id' => $currentUser->uuid,
|
2534 |
'user_image' => $sender_pic,
|
2534 |
'user_image' => $sender_pic,
|
2535 |
'u' => 1,
|
2535 |
'u' => 1,
|
2536 |
'mtype' => $file_type,
|
2536 |
'mtype' => $file_type,
|
2537 |
'm' => $this->url()->fromRoute('storage', ['code' => $currentUser->uuid, 'type' => 'chat', 'filename' => $filename]),
|
2537 |
'm' => $this->url()->fromRoute('storage', ['code' => $currentUser->uuid, 'type' => 'chat', 'filename' => $filename],['force_canonical' => true]),
|
2538 |
'time' => $msgtime,
|
2538 |
'time' => $msgtime,
|
2539 |
'id' => $chatMessage->uuid
|
2539 |
'id' => $chatMessage->uuid
|
2540 |
]
|
2540 |
]
|
2541 |
]);
|
2541 |
]);
|
2542 |
}
|
2542 |
}
|
Línea 2772... |
Línea 2772... |
2772 |
|
2772 |
|
2773 |
|
2773 |
|
2774 |
|
2774 |
|
2775 |
array_push($items, [
|
2775 |
array_push($items, [
|
2776 |
'name' => trim($record->first_name . ' ' . $record->last_name) . ' (' . $record->email . ')',
|
2776 |
'name' => trim($record->first_name . ' ' . $record->last_name) . ' (' . $record->email . ')',
|
2777 |
'image' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'user', 'filename' => $record->image]),
|
2777 |
'image' => $this->url()->fromRoute('storage', ['code' => $record->uuid, 'type' => 'user', 'filename' => $record->image],['force_canonical' => true]),
|
2778 |
'link_send' => $link_send,
|
2778 |
'link_send' => $link_send,
|
2779 |
'link_open_or_create' => $link_open_or_create,
|
2779 |
'link_open_or_create' => $link_open_or_create,
|