mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix notification
This commit is contained in:
@@ -280,7 +280,7 @@ export class RoomService {
|
||||
|
||||
if (this.hasLoadHistory) { return false }
|
||||
|
||||
this.storage.get('chatmsg' + this.id).then((messages = [])=>{
|
||||
this.storage.get('chatmsg' + this.id).then((messages = []) => {
|
||||
|
||||
let localMessages = []
|
||||
|
||||
@@ -296,7 +296,6 @@ export class RoomService {
|
||||
|
||||
this.WsChatService.loadHistory(this.id, limit).then((chatHistory:chatHistory) => {
|
||||
console.log('loadHistory', chatHistory)
|
||||
|
||||
|
||||
let localMessages = []
|
||||
chatHistory.result.messages.reverse().forEach(message => {
|
||||
@@ -311,7 +310,6 @@ export class RoomService {
|
||||
|
||||
this.storage.set('chatmsg' + this.id, chatHistory.result.messages.reverse())
|
||||
|
||||
|
||||
})
|
||||
|
||||
/* this.WsChatService.loadHistory(this.id, limit).then(async (chatHistory: chatHistory) => {
|
||||
|
||||
@@ -119,13 +119,13 @@ export class WsChatMethodsService {
|
||||
|
||||
|
||||
subscribeToRoomUpdate(id, roomData) {
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=>{
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=> {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription)=>{
|
||||
this.WsChatService.streamRoomMessages(id).then((subscription) => {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
})
|
||||
this.WsChatService.streamNotifyLogged().then((subscription=>{
|
||||
this.WsChatService.streamNotifyLogged().then((subscription=> {
|
||||
console.log('streamRoomMessages', subscription)
|
||||
}))
|
||||
this.WsChatService.streamNotifyRoomDeleteMessage(id).then((subscription)=>{
|
||||
@@ -138,7 +138,7 @@ export class WsChatMethodsService {
|
||||
|
||||
}
|
||||
|
||||
prepareRoom(roomData){
|
||||
prepareRoom(roomData) {
|
||||
let room:RoomService;
|
||||
|
||||
room = new RoomService(this.WsChatService, new MessageService(this.storage), this.storage, this.platform, this.sqlservice, this.NativeNotificationService)
|
||||
|
||||
@@ -302,7 +302,7 @@ export class WsChatService {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
if(message.id == requestId || deepFind(message,'result.id') == requestId) { // same request send
|
||||
resolve('')
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}})
|
||||
@@ -331,7 +331,7 @@ export class WsChatService {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
if(message.id == requestId ) { // same request send
|
||||
resolve('')
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}})
|
||||
@@ -517,7 +517,7 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
|
||||
if(message.id == requestId || deepFind(message,'result.id') == requestId) { // same request send
|
||||
resolve('')
|
||||
resolve(message)
|
||||
return true
|
||||
}
|
||||
}})
|
||||
|
||||
Reference in New Issue
Block a user