From 0270405353ba08240e6b48c7bc8668303f98c1e4 Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Sun, 23 Jul 2017 18:27:17 +0300 Subject: [PATCH] (Chat App) Adding chat service function fixed --- src/app/main/apps/chat/chat.service.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/main/apps/chat/chat.service.ts b/src/app/main/apps/chat/chat.service.ts index 484603d8..78638753 100644 --- a/src/app/main/apps/chat/chat.service.ts +++ b/src/app/main/apps/chat/chat.service.ts @@ -88,10 +88,11 @@ export class ChatService implements Resolve }; const chatListItem = { - 'id' : chatId, - 'contactId' : contactId, - 'unread' : null, - 'lastMessageTime': '2017-02-18T10:30:18.931Z' + contactId : contactId, + id : chatId, + lastMessageTime: '2017-02-18T10:30:18.931Z', + name : contact.name, + unread : null, }; /** @@ -109,7 +110,7 @@ export class ChatService implements Resolve * Post the new the user data */ this.http.post('api/chat-user/' + this.user.id, this.user) - .subscribe(addedlistItem => { + .subscribe(newUserData => { /** * Update the user data from server