mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
add send with wsAPI
This commit is contained in:
@@ -306,18 +306,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
sendMessage(){
|
sendMessage() {
|
||||||
let body = {
|
this.wsChatMethodsService.getDmRoom(this.roomId).send(this.message)
|
||||||
"message": { "rid": this.roomId, "msg": this.message }
|
|
||||||
}
|
|
||||||
|
|
||||||
this.chatService.sendMessage(body).subscribe(res=> {
|
|
||||||
this.getRoomInfo();
|
|
||||||
this.scrollingOnce = true;
|
|
||||||
|
|
||||||
},(error) => {
|
|
||||||
|
|
||||||
});
|
|
||||||
this.message = "";
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -296,31 +296,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
} */
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
sendMessage(){
|
sendMessage() {
|
||||||
let body = {
|
this.wsChatMethodsService.getDmRoom(this.roomId).send(this.message)
|
||||||
"message":
|
|
||||||
{
|
|
||||||
"rid": this.roomId,
|
|
||||||
"msg": this.message,
|
|
||||||
/* "attachments": [{
|
|
||||||
"color": "#ff0000",
|
|
||||||
"text": "Yay for gruggy!",
|
|
||||||
"title": "Attachment Example",
|
|
||||||
"title_link": "https://youtube.com",
|
|
||||||
"title_link_download": false,
|
|
||||||
"image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Chain_link_icon.png",
|
|
||||||
}] */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.chatService.sendMessage(body).subscribe(res=> {
|
|
||||||
/* this.loadGroupMessages(); */
|
|
||||||
//this.getRoomInfo();
|
|
||||||
this.scrollingOnce = true;
|
|
||||||
});
|
|
||||||
this.message = "";
|
this.message = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteMessage(msgId:string){
|
deleteMessage(msgId:string){
|
||||||
let body = {
|
let body = {
|
||||||
"roomId": this.roomId,
|
"roomId": this.roomId,
|
||||||
|
|||||||
Reference in New Issue
Block a user