This commit is contained in:
Peter Maquiran
2022-03-03 22:57:33 +01:00
parent 3a81e6df4d
commit f5880fec2a
15 changed files with 877 additions and 801 deletions
+9 -4
View File
@@ -138,7 +138,7 @@ export class AuthService {
this.autoLoginChat(expirationDate.getTime() - date);
}
async autoLoginChat(expirationDate:number){
async autoLoginChat(expirationDate:number) {
setTimeout(()=>{
this.loginChat();
}, expirationDate)
@@ -148,14 +148,18 @@ export class AuthService {
setTimeout(()=>{
this.WsChatService.connect();
this.WsChatService.login().then((message) => {
console.log('rocket chat login successfully', message)
this.WsChatService.login().then((message: any) => {
SessionStore.user.RochetChatUserId = message.result.id
SessionStore.save()
this.WsChatService.setStatus('online')
}).catch((message)=>{
}).catch((message) => {
console.log('rocket chat login failed', message)
})
// before sending a message with a attachment
this.NfService.beforeSendAttachment = async (message: MessageService, room?: RoomService) => {
if(message.hasFile) {
@@ -225,6 +229,7 @@ export class AuthService {
return false
}
};
}, 1)
}