mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 12:35:07 +00:00
(Chat) Replaced multi line comments with single line comments
This commit is contained in:
parent
634ff42f1a
commit
67cb05be6b
|
@ -74,9 +74,7 @@ export class ChatService implements Resolve<any>
|
||||||
return item.contactId === contactId;
|
return item.contactId === contactId;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
// Create new chat, if it's not created yet.
|
||||||
* Create new chat, if it's not created yet.
|
|
||||||
*/
|
|
||||||
if ( !chatItem )
|
if ( !chatItem )
|
||||||
{
|
{
|
||||||
this.createNewChat(contactId).then((newChats) => {
|
this.createNewChat(contactId).then((newChats) => {
|
||||||
|
@ -137,26 +135,18 @@ export class ChatService implements Resolve<any>
|
||||||
unread : null
|
unread : null
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// Add new chat list item to the user's chat list
|
||||||
* Add new chat list item to the user's chat list
|
|
||||||
*/
|
|
||||||
this.user.chatList.push(chatListItem);
|
this.user.chatList.push(chatListItem);
|
||||||
|
|
||||||
/**
|
// Post the created chat
|
||||||
* Post the created chat
|
|
||||||
*/
|
|
||||||
this._httpClient.post('api/chat-chats', {...chat})
|
this._httpClient.post('api/chat-chats', {...chat})
|
||||||
.subscribe((response: any) => {
|
.subscribe((response: any) => {
|
||||||
|
|
||||||
/**
|
// Post the new the user data
|
||||||
* Post the new the user data
|
|
||||||
*/
|
|
||||||
this._httpClient.post('api/chat-user/' + this.user.id, this.user)
|
this._httpClient.post('api/chat-user/' + this.user.id, this.user)
|
||||||
.subscribe(newUserData => {
|
.subscribe(newUserData => {
|
||||||
|
|
||||||
/**
|
// Update the user data from server
|
||||||
* Update the user data from server
|
|
||||||
*/
|
|
||||||
this.getUser().then(updatedUser => {
|
this.getUser().then(updatedUser => {
|
||||||
this.onUserUpdated.next(updatedUser);
|
this.onUserUpdated.next(updatedUser);
|
||||||
resolve(updatedUser);
|
resolve(updatedUser);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user