| Línea 221... |
Línea 221... |
| 221 |
'filename' => $company->image
|
221 |
'filename' => $company->image
|
| 222 |
], ['force_canonical' => true]),
|
222 |
], ['force_canonical' => true]),
|
| 223 |
'profile' => $this->url()->fromRoute('company/view', ['id' => $company->uuid]),
|
223 |
'profile' => $this->url()->fromRoute('company/view', ['id' => $company->uuid]),
|
| 224 |
'last_message' => $timeElapsedString,
|
224 |
'last_message' => $timeElapsedString,
|
| 225 |
'count_unread' => $unread,
|
225 |
'count_unread' => $unread,
|
| 226 |
'messages_link' => $this->url()->fromRoute('inmail/message/list', ['id' => $user->uuid]),
|
226 |
'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $company->uuid]),
|
| 227 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
|
227 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $company->uuid]),
|
| 228 |
'selected' => 1, // Marcar como seleccionado
|
228 |
'selected' => 1, // Marcar como seleccionado
|
| 229 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
|
229 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $company->uuid]),
|
| 230 |
]);
|
230 |
]);
|
| 231 |
}
|
231 |
}
|
| 232 |
}
|
232 |
}
|
| 233 |
// ========================================
|
233 |
// ========================================
|
| 234 |
// BÚSQUEDA COMO USUARIO INDIVIDUAL
|
234 |
// BÚSQUEDA COMO USUARIO INDIVIDUAL
|
| Línea 273... |
Línea 273... |
| 273 |
'filename' => $user->image
|
273 |
'filename' => $user->image
|
| 274 |
], ['force_canonical' => true]),
|
274 |
], ['force_canonical' => true]),
|
| 275 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
275 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
| 276 |
'last_message' => $timeElapsedString,
|
276 |
'last_message' => $timeElapsedString,
|
| 277 |
'count_unread' => $unread,
|
277 |
'count_unread' => $unread,
|
| 278 |
'messages_link' => $this->url()->fromRoute('inmail/message/list', ['id' => $user->uuid]),
|
278 |
'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $user->uuid]),
|
| 279 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
|
279 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
|
| 280 |
'selected' => 1, // Marcar como seleccionado
|
280 |
'selected' => 1, // Marcar como seleccionado
|
| 281 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
|
281 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
|
| 282 |
]);
|
282 |
]);
|
| 283 |
}
|
283 |
}
|
| 284 |
}
|
284 |
}
|
| 285 |
}
|
285 |
}
|
| 286 |
}
|
286 |
}
|
| 287 |
|
- |
|
| 288 |
// ========================================
|
- |
|
| 289 |
// OBTENCIÓN DE TODAS LAS CONVERSACIONES EXISTENTES
|
- |
|
| 290 |
// ========================================
|
- |
|
| Línea 291... |
Línea 287... |
| 291 |
|
287 |
|
| Línea 292... |
Línea 288... |
| 292 |
$records = $conversationMapper->fetchAllByUserId($currentUser->id);
|
288 |
$records = $conversationMapper->fetchAllByUserId($currentUser->id);
|
| 293 |
|
- |
|
| 294 |
foreach ($records as $record) {
|
- |
|
| 295 |
// ========================================
|
- |
|
| 296 |
// FILTRADO DE CONVERSACIONES YA PROCESADAS
|
- |
|
| 297 |
// ========================================
|
289 |
|
| 298 |
|
290 |
foreach ($records as $record) {
|
| 299 |
// Omitir conversaciones que ya fueron procesadas como seleccionadas
|
291 |
// Omitir conversaciones que ya fueron procesadas como seleccionadas
|
| 300 |
if ($selected_user_id) {
|
292 |
if ($selected_user_id) {
|
| 301 |
if ($record->sender_id == $currentUser->id && $record->receiver_id == $selected_user_id) {
|
293 |
if ($record->sender_id == $currentUser->id && $record->receiver_id == $selected_user_id) {
|
| Línea 353... |
Línea 345... |
| 353 |
'filename' => $user->image
|
345 |
'filename' => $user->image
|
| 354 |
], ['force_canonical' => true]),
|
346 |
], ['force_canonical' => true]),
|
| 355 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
347 |
'profile' => $this->url()->fromRoute('profile/view', ['id' => $user->uuid]),
|
| 356 |
'last_message' => $timeElapsedString,
|
348 |
'last_message' => $timeElapsedString,
|
| 357 |
'count_unread' => $unread,
|
349 |
'count_unread' => $unread,
|
| 358 |
'messages_link' => $this->url()->fromRoute('inmail/message/list', ['id' => $user->uuid]),
|
350 |
'messages_link' => $this->url()->fromRoute('inmail/message', ['id' => $user->uuid]),
|
| 359 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
|
351 |
'send_link' => $this->url()->fromRoute('inmail/message/send', ['id' => $user->uuid]),
|
| 360 |
'selected' => 0, // No seleccionado
|
352 |
'selected' => 0, // No seleccionado
|
| 361 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
|
353 |
'delete_link' => $this->url()->fromRoute('inmail/message/delete', ['id' => $user->uuid]),
|
| 362 |
]);
|
354 |
]);
|
| 363 |
}
|
355 |
}
|