mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
fix chat delete message
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user