add send with wsAPI

This commit is contained in:
tiago.kayaya
2022-01-14 12:29:44 +01:00
parent eba253b650
commit 2bbe9e859c
2 changed files with 5 additions and 34 deletions
@@ -306,18 +306,8 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
sendMessage(){
let body = {
"message": { "rid": this.roomId, "msg": this.message }
}
this.chatService.sendMessage(body).subscribe(res=> {
this.getRoomInfo();
this.scrollingOnce = true;
},(error) => {
});
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send(this.message)
this.message = "";
}
@@ -296,31 +296,12 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
} */
}
sendMessage(){
let body = {
"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;
});
sendMessage() {
this.wsChatMethodsService.getDmRoom(this.roomId).send(this.message)
this.message = "";
}
deleteMessage(msgId:string){
let body = {
"roomId": this.roomId,