diff --git a/src/app/pages/chat/messages/contacts/contacts.page.html b/src/app/pages/chat/messages/contacts/contacts.page.html index 5dc48c889..3ac1d542e 100644 --- a/src/app/pages/chat/messages/contacts/contacts.page.html +++ b/src/app/pages/chat/messages/contacts/contacts.page.html @@ -29,7 +29,7 @@
- +
{{header}} diff --git a/src/app/pages/chat/messages/contacts/contacts.page.ts b/src/app/pages/chat/messages/contacts/contacts.page.ts index a8dc89df4..8c23c93dd 100644 --- a/src/app/pages/chat/messages/contacts/contacts.page.ts +++ b/src/app/pages/chat/messages/contacts/contacts.page.ts @@ -6,6 +6,7 @@ import { ChatService } from 'src/app/services/chat.service'; import { GroupMessagesPage } from '../../group-messages/group-messages.page'; import { MessagesPage } from '../messages.page'; import { ThemeService } from 'src/app/services/theme.service' +import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service' @Component({ selector: 'app-contacts', @@ -29,7 +30,8 @@ export class ContactsPage implements OnInit { private http: HttpClient, private chatService: ChatService, private authService: AuthService, - public ThemeService: ThemeService + public ThemeService: ThemeService, + public WsChatMethodsService: WsChatMethodsService ) { this.loggedUser = authService.ValidatedUserChat['data']; diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index cd96d15e9..fae2adf08 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -222,11 +222,15 @@ export class WsChatMethodsService { const username = d.fields.args[0][1] const statusNum = d.fields.args[0][2] - - console.log('d', d) const statusText = this.statusNumberToText(statusNum) - this.getUserByName(username).status = statusText + + const user = this.getUserByName(username) + + if(user) { + user.status = statusText + } + }) } diff --git a/src/app/shared/chat/messages/contacts/contacts.page.html b/src/app/shared/chat/messages/contacts/contacts.page.html index be0ccfea1..ba60cce1e 100644 --- a/src/app/shared/chat/messages/contacts/contacts.page.html +++ b/src/app/shared/chat/messages/contacts/contacts.page.html @@ -29,7 +29,7 @@
- +
{{header}} diff --git a/src/app/shared/chat/messages/contacts/contacts.page.ts b/src/app/shared/chat/messages/contacts/contacts.page.ts index fdfbefb5a..2ac2537ca 100644 --- a/src/app/shared/chat/messages/contacts/contacts.page.ts +++ b/src/app/shared/chat/messages/contacts/contacts.page.ts @@ -6,6 +6,7 @@ import { ChatService } from 'src/app/services/chat.service'; import { GroupMessagesPage } from '../../group-messages/group-messages.page'; import { MessagesPage } from '../messages.page'; import { ThemeService } from 'src/app/services/theme.service' +import { WsChatMethodsService} from 'src/app/services/chat/ws-chat-methods.service' @Component({ selector: 'app-contacts', @@ -31,7 +32,8 @@ export class ContactsPage implements OnInit { private http: HttpClient, private chatService: ChatService, private authService: AuthService, - public ThemeService: ThemeService + public ThemeService: ThemeService, + public WsChatMethodsService: WsChatMethodsService ) { this.loggedUser = authService.ValidatedUserChat['data'];