Browse Source

misc

master
Eduard Kuzmenko 3 years ago
parent
commit
b9c86cf417
  1. 11
      src/lib/appManagers/appChatsManager.ts

11
src/lib/appManagers/appChatsManager.ts

@ -480,9 +480,7 @@ export class AppChatsManager {
return apiManager.invokeApi('channels.inviteToChannel', { return apiManager.invokeApi('channels.inviteToChannel', {
channel: input, channel: input,
users: usersInputs users: usersInputs
}).then(updates => { }).then(this.onChatUpdated.bind(this, id));
apiUpdatesManager.processUpdateMessage(updates);
});
} }
public createChat(title: string, userIds: number[]): Promise<number> { public createChat(title: string, userIds: number[]): Promise<number> {
@ -499,14 +497,11 @@ export class AppChatsManager {
}); });
} }
private onChatUpdated = (chatId: number, updates: any) => { private onChatUpdated = (chatId: number, updates?: any) => {
//console.log('onChatUpdated', chatId, updates); //console.log('onChatUpdated', chatId, updates);
apiUpdatesManager.processUpdateMessage(updates); apiUpdatesManager.processUpdateMessage(updates);
if(updates && if(updates?.updates?.length && this.isChannel(chatId)) {
/* updates.updates &&
updates.updates.length && */
this.isChannel(chatId)) {
rootScope.dispatchEvent('invalidate_participants', chatId); rootScope.dispatchEvent('invalidate_participants', chatId);
} }
}; };

Loading…
Cancel
Save