Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 11589 | Rev 11715 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11589 Rev 11711
Línea 246... Línea 246...
246
                    
246
                    
247
                    
247
                    
248
                    $is_open = in_array($chatGroup->uuid, $_SESSION[self::SESSION_CHAT_OPEN_BOXES]);
248
                    $is_open = in_array($chatGroup->uuid, $_SESSION[self::SESSION_CHAT_OPEN_BOXES]);
249
                    $not_seen_messages     = $chatGroupUserMessageMapper->existNotSeenMessages($chatGroup->id, $currentUser->id);
-
 
250
                    $not_received_messages = $chatGroupUserMessageMapper->existNotReceivedMessages($chatGroup->id, $currentUser->id);
249
                    $not_seen_messages     = $chatGroupUserMessageMapper->existNotSeenMessages($chatGroup->id, $currentUser->id);
251
                  
-
 
252
                    if($chatUserOwner->user_id == $currentUser->id ) {
250
                    $not_received_messages = $chatGroupUserMessageMapper->existNotReceivedMessages($chatGroup->id, $currentUser->id);
253
                        
251
                    if($chatGroup->high_performance_team_groups_id!=NULL){
254
                        $chat = [
252
                        $chat = [
255
                            'url_leave'                             => '',
253
                            'url_leave'                             => '',
256
                            'url_delete'                            => $this->url()->fromRoute('chat/delete-group', ['group_id' => $chatGroup->uuid]),
254
                            'url_delete'                            => '',
257
                            'url_add_user_to_group'                 => $this->url()->fromRoute('chat/add-user-to-group', ['group_id' => $chatGroup->uuid]),
255
                            'url_add_user_to_group'                 => '',
258
                            'url_get_contact_group_list'            => $this->url()->fromRoute('chat/get-contact-group-list', ['group_id' => $chatGroup->uuid]),
256
                            'url_get_contact_group_list'            => $this->url()->fromRoute('chat/get-contact-group-list', ['group_id' => $chatGroup->uuid]),
259
                            'url_get_contacts_availables_for_group' => $this->url()->fromRoute('chat/get-contacts-availables-for-group', ['group_id' => $chatGroup->uuid]),
257
                            'url_get_contacts_availables_for_group' => $this->url()->fromRoute('chat/get-contacts-availables-for-group', ['group_id' => $chatGroup->uuid]),
260
                            'url_clear'                             => $this->url()->fromRoute('chat/clear', ['id' => $chatGroup->uuid]),
258
                            'url_clear'                             => $this->url()->fromRoute('chat/clear', ['id' => $chatGroup->uuid]),
Línea 270... Línea 268...
270
                            'is_open'                               => $is_open ? 1 : 0,
268
                            'is_open'                               => $is_open ? 1 : 0,
271
                            'not_seen_messages'                     => $not_seen_messages,
269
                            'not_seen_messages'                     => $not_seen_messages,
272
                            'not_received_messages'                 => $not_received_messages,
270
                            'not_received_messages'                 => $not_received_messages,
Línea 273... Línea 271...
273
                            
271
                            
274
                        ];
272
                        ];
-
 
273
                    }else{
-
 
274
                        if($chatUserOwner->user_id == $currentUser->id ) {
-
 
275
                        
-
 
276
                            $chat = [
-
 
277
                                'url_leave'                             => '',
-
 
278
                                'url_delete'                            => $this->url()->fromRoute('chat/delete-group', ['group_id' => $chatGroup->uuid]),
-
 
279
                                'url_add_user_to_group'                 => $this->url()->fromRoute('chat/add-user-to-group', ['group_id' => $chatGroup->uuid]),
-
 
280
                                'url_get_contact_group_list'            => $this->url()->fromRoute('chat/get-contact-group-list', ['group_id' => $chatGroup->uuid]),
-
 
281
                                'url_get_contacts_availables_for_group' => $this->url()->fromRoute('chat/get-contacts-availables-for-group', ['group_id' => $chatGroup->uuid]),
-
 
282
                                'url_clear'                             => $this->url()->fromRoute('chat/clear', ['id' => $chatGroup->uuid]),
-
 
283
                                'url_close'                             => $this->url()->fromRoute('chat/close', ['id' => $chatGroup->uuid]),
-
 
284
                                'url_send'                              => $this->url()->fromRoute('chat/send', ['id' => $chatGroup->uuid]),
-
 
285
                                'url_upload'                            => $this->url()->fromRoute('chat/upload', ['id' => $chatGroup->uuid]),
-
 
286
                                'url_get_all_messages'                  => $this->url()->fromRoute('chat/get-all-messages', ['id' => $chatGroup->uuid]),
-
 
287
                                'url_mark_seen'                         => $this->url()->fromRoute('chat/mark-seen', ['id' => $chatGroup->uuid]),
-
 
288
                                'url_mark_received'                     => $this->url()->fromRoute('chat/mark-received', ['id' => $chatGroup->uuid]),
-
 
289
                                'id'                                    => $chatGroup->uuid,
-
 
290
                                'name'                                  => $chatGroup->name,
-
 
291
                                'type'                                  => 'group',
-
 
292
                                'is_open'                               => $is_open ? 1 : 0,
-
 
293
                                'not_seen_messages'                     => $not_seen_messages,
-
 
294
                                'not_received_messages'                 => $not_received_messages,
-
 
295
                                
-
 
296
                            ];
275
                    } else {
297
                        } else {
276
                 
298
                     
277
                        $chat = [
299
                            $chat = [
278
                            'url_delete'                    => '',
300
                                'url_delete'                    => '',
279
                            'url_add_user_to_group'         => '',
301
                                'url_add_user_to_group'         => '',
280
                            'url_get_contact_group_list'    => $this->url()->fromRoute('chat/get-contact-group-list', ['group_id' => $chatGroup->uuid]),
302
                                'url_get_contact_group_list'    => $this->url()->fromRoute('chat/get-contact-group-list', ['group_id' => $chatGroup->uuid]),
281
                            'url_leave'                     => $this->url()->fromRoute('chat/leave-group', ['group_id' => $chatGroup->uuid]),
303
                                'url_leave'                     => $this->url()->fromRoute('chat/leave-group', ['group_id' => $chatGroup->uuid]),
282
                            'url_clear'                     => $this->url()->fromRoute('chat/clear', ['id' => $chatGroup->uuid]),
304
                                'url_clear'                     => $this->url()->fromRoute('chat/clear', ['id' => $chatGroup->uuid]),
283
                            'url_close'                     => $this->url()->fromRoute('chat/close', ['id' => $chatGroup->uuid]),
305
                                'url_close'                     => $this->url()->fromRoute('chat/close', ['id' => $chatGroup->uuid]),
284
                            'url_send'                      => $this->url()->fromRoute('chat/send', ['id' => $chatGroup->uuid]),
306
                                'url_send'                      => $this->url()->fromRoute('chat/send', ['id' => $chatGroup->uuid]),
285
                            'url_upload'                    => $this->url()->fromRoute('chat/upload', ['id' => $chatGroup->uuid]),
307
                                'url_upload'                    => $this->url()->fromRoute('chat/upload', ['id' => $chatGroup->uuid]),
286
                            'url_get_all_messages'          => $this->url()->fromRoute('chat/get-all-messages', ['id' => $chatGroup->uuid]),
308
                                'url_get_all_messages'          => $this->url()->fromRoute('chat/get-all-messages', ['id' => $chatGroup->uuid]),
287
                            'url_mark_seen'                 => $this->url()->fromRoute('chat/mark-seen', ['id' => $chatGroup->uuid]),
309
                                'url_mark_seen'                 => $this->url()->fromRoute('chat/mark-seen', ['id' => $chatGroup->uuid]),
288
                            'url_mark_received'             => $this->url()->fromRoute('chat/mark-received', ['id' => $chatGroup->uuid]),
310
                                'url_mark_received'             => $this->url()->fromRoute('chat/mark-received', ['id' => $chatGroup->uuid]),
289
                            'id'                            => $chatGroup->uuid,
311
                                'id'                            => $chatGroup->uuid,
290
                            'name'                          => $chatGroup->name,
312
                                'name'                          => $chatGroup->name,
291
                            'type'                          => 'group',
313
                                'type'                          => 'group',
292
                            'is_open'                       => $is_open ? 1 : 0,
314
                                'is_open'                       => $is_open ? 1 : 0,
293
                            'not_seen_messages'             => $not_seen_messages,
315
                                'not_seen_messages'             => $not_seen_messages,
-
 
316
                                'not_received_messages'         => $not_received_messages,
294
                            'not_received_messages'         => $not_received_messages,
317
                            ];
295
                        ];
318
                        }
-
 
319
                    }
Línea 296... Línea 320...
296
                    }
320
                   
297
 
321
 
298
                   array_push($chats, $chat);
322
                   array_push($chats, $chat);