mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix
This commit is contained in:
@@ -133,7 +133,6 @@
|
|||||||
<div class="item-message" *ngIf="group.value.otherUserType == false">{{group.value.lastMessage.u.name}}: {{group.value.lastMessage.msg}} </div>
|
<div class="item-message" *ngIf="group.value.otherUserType == false">{{group.value.lastMessage.u.name}}: {{group.value.lastMessage.msg}} </div>
|
||||||
<div *ngIf="group.value.otherUserType == true">{{group.value.userThatIsTyping}} A escrever ...</div>
|
<div *ngIf="group.value.otherUserType == true">{{group.value.userThatIsTyping}} A escrever ...</div>
|
||||||
|
|
||||||
<div *ngIf="group.value.lastMessage.u.name" class="item-message">{{group.value.lastMessage.u.name}}: {{group.value.lastMessage.msg}} </div>
|
|
||||||
<div class="item-files add-ellipsis" *ngIf="group.value.file">
|
<div class="item-files add-ellipsis" *ngIf="group.value.file">
|
||||||
<fa-icon *ngIf="group.value.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
<fa-icon *ngIf="group.value.lastMessage.file.type != 'application/meeting'" icon="file-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
||||||
<fa-icon *ngIf="group.value.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
<fa-icon *ngIf="group.value.lastMessage.file.type == 'application/meeting'" icon="calendar-alt" class="file-icon" [class.set-active-item-font-to-white]="group.value.id == idSelected"></fa-icon>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class RoomService {
|
|||||||
|
|
||||||
receiveMessage() {
|
receiveMessage() {
|
||||||
|
|
||||||
this.WsChatService.upateRoomEvents(
|
this.WsChatService.updateRoomEventss(
|
||||||
this.id,
|
this.id,
|
||||||
"stream-room-messages",
|
"stream-room-messages",
|
||||||
(ChatMessage) => {
|
(ChatMessage) => {
|
||||||
@@ -127,7 +127,7 @@ export class RoomService {
|
|||||||
|
|
||||||
async receiveMessageDelete() {
|
async receiveMessageDelete() {
|
||||||
|
|
||||||
this.WsChatService.upateRoomEvents(
|
this.WsChatService.updateRoomEventss(
|
||||||
this.id,
|
this.id,
|
||||||
"stream-notify-room",
|
"stream-notify-room",
|
||||||
async (ChatMessage) => {
|
async (ChatMessage) => {
|
||||||
|
|||||||
@@ -45,7 +45,19 @@ export class WsChatMethodsService {
|
|||||||
|
|
||||||
const rooms = await this.WsChatService.getRooms();
|
const rooms = await this.WsChatService.getRooms();
|
||||||
|
|
||||||
// console.log("ROOMS" + JSON.stringify(rooms))
|
|
||||||
|
this.WsChatService.registerCallback({
|
||||||
|
type:'Onmessage',
|
||||||
|
funx:(message)=>{
|
||||||
|
|
||||||
|
if(message.msg =='changed' && message.collection == "stream-room-messages") {
|
||||||
|
if(message.fields.args[0].rid) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
rooms.result.update.forEach((roomData: room) => {
|
rooms.result.update.forEach((roomData: room) => {
|
||||||
this.prepareRoom(roomData);
|
this.prepareRoom(roomData);
|
||||||
|
|||||||
@@ -425,7 +425,7 @@ export class WsChatService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
upateRoomEvents(roomId, collection:string, funx: Function, ) {
|
updateRoomEventss(roomId, collection:string, funx: Function, ) {
|
||||||
|
|
||||||
this.ws.registerCallback({
|
this.ws.registerCallback({
|
||||||
type:'Onmessage',
|
type:'Onmessage',
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ export class NativeNotificationService {
|
|||||||
|
|
||||||
LocalNotifications.requestPermissions()
|
LocalNotifications.requestPermissions()
|
||||||
|
|
||||||
|
LocalNotifications.checkPermissions().then((data)=>{
|
||||||
|
console.log('success', data)
|
||||||
|
}).catch((data)=>{
|
||||||
|
console.log('error', data)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sendNotificationChat({title = 'User', icon = '', message = 'hello'}) {
|
sendNotificationChat({title = 'User', icon = '', message = 'hello'}) {
|
||||||
@@ -24,9 +30,9 @@ export class NativeNotificationService {
|
|||||||
LocalNotifications.schedule({
|
LocalNotifications.schedule({
|
||||||
notifications:[
|
notifications:[
|
||||||
{
|
{
|
||||||
title : 'tile',
|
title : title,
|
||||||
body : 'df',
|
body : message,
|
||||||
id : 55
|
id : new Date().getTime()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user