mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
receive message
This commit is contained in:
@@ -131,7 +131,7 @@ export class AuthService {
|
||||
localStorage.setItem('userChat', JSON.stringify(responseChat));
|
||||
this.storageService.store(AuthConnstants.AUTH, responseChat);
|
||||
|
||||
this.autologout(10000);
|
||||
// this.autologout(10000);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -77,6 +77,11 @@ export class RoomService {
|
||||
this.calDateDuration()
|
||||
}
|
||||
|
||||
|
||||
isSenderIsNotMe(ChatMessage) {
|
||||
return SessionStore.user.RochetChatUser != ChatMessage.u.username
|
||||
}
|
||||
|
||||
receiveMessage() {
|
||||
|
||||
this.WsChatService.updateRoomEventss(
|
||||
@@ -84,7 +89,7 @@ export class RoomService {
|
||||
"stream-room-messages",
|
||||
(ChatMessage) => {
|
||||
|
||||
if(environment.chatOffline == false) {
|
||||
if(environment.chatOffline == false || this.isSenderIsNotMe(ChatMessage)) {
|
||||
ChatMessage = ChatMessage.fields.args[0]
|
||||
ChatMessage = this.fix_updatedAt(ChatMessage)
|
||||
console.log('recivemessage', ChatMessage)
|
||||
@@ -99,14 +104,10 @@ export class RoomService {
|
||||
this.scrollDown()
|
||||
}, 100)
|
||||
|
||||
//this.sortService.sortDate(this.messages, '')
|
||||
|
||||
if(SessionStore.user.RochetChatUser != ChatMessage.u.username) {
|
||||
this.NativeNotificationService.sendNotificationChat({
|
||||
message: message.msg,
|
||||
title: this.name
|
||||
});
|
||||
}
|
||||
this.NativeNotificationService.sendNotificationChat({
|
||||
message: message.msg,
|
||||
title: this.name
|
||||
});
|
||||
|
||||
this.addMessageDB(ChatMessage)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user