mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix chat delete message
This commit is contained in:
+2
-1
@@ -76,4 +76,5 @@ _android/
|
||||
_www/
|
||||
www2020
|
||||
android copy/
|
||||
report.*
|
||||
report.*
|
||||
src/plugin/src/
|
||||
@@ -115,7 +115,6 @@ export class ChatPage implements OnInit {
|
||||
public ChatSystemService: ChatSystemService,
|
||||
) {
|
||||
|
||||
this.loggedUserChat = SessionStore.user.ChatData?.data;
|
||||
this.headers = new HttpHeaders();
|
||||
window.onresize = (event) => {
|
||||
if (window.innerWidth > 701) {
|
||||
@@ -591,11 +590,8 @@ export class ChatPage implements OnInit {
|
||||
return dateB - dateA;
|
||||
});
|
||||
//
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -617,7 +613,6 @@ export class ChatPage implements OnInit {
|
||||
_updatedAt: element._updatedAt
|
||||
}
|
||||
|
||||
|
||||
groupsArray.push(roomList)
|
||||
});
|
||||
|
||||
@@ -636,7 +631,6 @@ export class ChatPage implements OnInit {
|
||||
updatedat: element._updatedAt
|
||||
}
|
||||
|
||||
|
||||
this.sqlservice.addChatListRoom(roomList);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -446,9 +446,11 @@ export class MessageService {
|
||||
|
||||
async delateDB() {
|
||||
|
||||
const message = await MessageModel.get({id: this.id})
|
||||
await message.delete()
|
||||
if(!this.rowInstance) {
|
||||
this.rowInstance = await this.getRowInstance()
|
||||
}
|
||||
|
||||
await this.rowInstance.delete()
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -452,7 +452,13 @@ export class RoomService {
|
||||
"stream-notify-room",
|
||||
async (ChatMessage) => {
|
||||
const DeletedMessageId = ChatMessage.fields.args[0]._id;
|
||||
this.deleteMessage(DeletedMessageId)
|
||||
|
||||
const message = this.messages.find((e) => e._id == DeletedMessageId)
|
||||
|
||||
if(message.delate == false) {
|
||||
this.deleteMessage(DeletedMessageId)
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Observable, from } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { UserSession } from '../models/user.model';
|
||||
import { EventList } from '../models/agenda/AgendaEventList';
|
||||
import { ChangeProfileService } from './change-profile.service';
|
||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "46296813b",
|
||||
"SHA": "46296813b849aad1f6037fa09577a2ba04f4d2ca",
|
||||
"shortSHA": "b890b58a8",
|
||||
"SHA": "b890b58a86e4c459836236774015a1bc38ee0b1c",
|
||||
"branch": "no_bug_movemente",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Wed Jan 18 11:38:21 2023 +0100'",
|
||||
"lastCommitMessage": "clear agenda cache",
|
||||
"lastCommitNumber": "4651",
|
||||
"lastCommitTime": "'Wed Jan 18 11:59:53 2023 +0100'",
|
||||
"lastCommitMessage": "fix",
|
||||
"lastCommitNumber": "4652",
|
||||
"change": "",
|
||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/services/attachments.service.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/services/contacts.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/services/organic-entity.service.ts\n\tmodified: src/app/services/publications.service.ts\n\tmodified: src/app/services/search.service.ts",
|
||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: .gitignore\n\tmodified: src/app/pages/chat/chat.page.ts\n\tmodified: src/app/services/chat/message.service.ts\n\tmodified: src/app/services/chat/room.service.ts\n\tmodified: src/app/services/events.service.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user