send message programmatically

This commit is contained in:
Peter Maquiran
2022-01-10 12:15:27 +01:00
parent c398e3fa24
commit 77a8bfffa1
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -118,6 +118,11 @@ export class HomePage implements OnInit {
});
})
//send message // roomId // Message
this.RocketChatClientService.send('fsMwcNdufWvdnChj7ya9nF9cX2HizxxWAM', 'Mensagem enviada programaticamente.'+ new Date().toISOString())
}).catch((message)=>{
console.log('rocket chat login failed', message)
}).finally(()=>{
@@ -29,6 +29,8 @@ class _RocketChatClientService {
return conditionToSend
}
private runRequestQueue(){}
connect(firstPingFunx: Function) {
this.hasPing = false
this.firstPingFunx = firstPingFunx
@@ -83,6 +85,7 @@ class _RocketChatClientService {
if(message.result) {
if(message.result.token) {
this.isLogin = true
this.runRequestQueue()
this.ws.wsMsgQueue()
resolve(message)
} else {