mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
chat notification added
This commit is contained in:
@@ -382,15 +382,24 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
sendMessage(msg) {
|
||||
let lastMsg = msg.pop();
|
||||
console.log(msg)
|
||||
console.log(lastMsg._id,lastMsg.msg,lastMsg.msg)
|
||||
this.ChatSystemService.getDmRoom(this.roomId).send({}).then(() => {
|
||||
console.log(this.members)
|
||||
this.notificationService.ChatSendMessageNotification(this.members[1].username,this.members[1].name,lastMsg.msg,this.roomId)
|
||||
})
|
||||
}
|
||||
|
||||
/* sendMessage(msg) {
|
||||
let lastMsg = msg.pop();
|
||||
console.log(msg)
|
||||
console.log(lastMsg._id,lastMsg.u.username,lastMsg.msg)
|
||||
this.ChatSystemService.getDmRoom(this.roomId).send({}).then(() => {
|
||||
if(lastMsg.u.username == this.members[1].username) {
|
||||
this.notificationService.ChatSendMessageNotification(this.members[0].username,this.members[1].name,lastMsg.msg,this.roomId)
|
||||
} else if (msg.u.username == this.members[0].username) {
|
||||
this.notificationService.ChatSendMessageNotification(this.members[1].username,this.members[1].name,lastMsg.msg,this.roomId)
|
||||
}
|
||||
|
||||
})
|
||||
} */
|
||||
|
||||
base64toBlob(base64Data, contentType) {
|
||||
contentType = contentType || '';
|
||||
var sliceSize = 1024;
|
||||
|
||||
Reference in New Issue
Block a user