mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
send direct message
This commit is contained in:
+36
-2
@@ -19,6 +19,22 @@ interface msgObj {
|
||||
requestId: string;
|
||||
}
|
||||
|
||||
interface sendDeliverAt {
|
||||
memberId: number,
|
||||
messageId:string,
|
||||
roomId: string,
|
||||
requestId: string
|
||||
}
|
||||
|
||||
|
||||
export interface sendReadAt {
|
||||
memberId: number,
|
||||
messageId:string,
|
||||
roomId: string,
|
||||
requestId: string
|
||||
}
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -48,6 +64,24 @@ export class MessageSocketRepositoryService {
|
||||
return result;
|
||||
}
|
||||
|
||||
async sendDeliverAt(data: sendDeliverAt) {
|
||||
const result = await this.socket.sendData<any>({
|
||||
method: 'DeliverAt',
|
||||
data: data as any,
|
||||
})
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async sendReadAt(data: sendReadAt) {
|
||||
const result = await this.socket.sendData<any>({
|
||||
method: 'ReadAt',
|
||||
data: data as any,
|
||||
})
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
listenToMessages() {
|
||||
return this.socket.getMessage()
|
||||
}
|
||||
@@ -62,7 +96,7 @@ export class MessageSocketRepositoryService {
|
||||
return this.socket.getMessageUpdate()
|
||||
}
|
||||
|
||||
|
||||
|
||||
reactToMessageSocket(data) {
|
||||
this.socket.sendData({
|
||||
method: 'ReactMessage',
|
||||
@@ -94,6 +128,6 @@ export class MessageSocketRepositoryService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user