mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix
This commit is contained in:
@@ -72,7 +72,7 @@ export class MessageService {
|
||||
private AESEncrypt: AESEncrypt,
|
||||
private AttachmentsService: AttachmentsService,
|
||||
private NetworkServiceService: NetworkServiceService,
|
||||
private ChatSystemService: ChatSystemService) {
|
||||
private ChatSystemService: ChatSystemService,) {
|
||||
}
|
||||
|
||||
setData({customFields = {}, channels, mentions, msg ,rid ,ts, u, t, _id, id, _updatedAt, file, attachments, temporaryData, localReference = 'out-'+uuidv4() , viewed = [], received = [], delate = false, delateRequest =false, from, sendAttempt = 0, origin }:Message) {
|
||||
@@ -180,8 +180,9 @@ export class MessageService {
|
||||
|
||||
async send(): Promise<any> {
|
||||
if(this.messageSend) {
|
||||
console.log('sended')
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve('solve')
|
||||
resolve('solve')
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
import { Injectable, NgZone } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { AuthConnstants } from 'src/app/config/auth-constants';
|
||||
@@ -171,6 +171,29 @@ export class NotificationsService {
|
||||
);
|
||||
}
|
||||
|
||||
ChatSendMessageNotification(userID,title,bodymsg,roomId) {
|
||||
const geturl = environment.apiURL + `notifications/send`;
|
||||
|
||||
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
||||
const body = {
|
||||
UserId: userID,
|
||||
title: title,
|
||||
body: bodymsg,
|
||||
data: {
|
||||
Service: "chat",
|
||||
IdObject: roomId
|
||||
}
|
||||
};
|
||||
let id = 437
|
||||
console.log(userID,title,bodymsg,roomId)
|
||||
this.http.post<Tokenn>(geturl+`?userId=${userID}&title=${title}&body=${bodymsg}`, body, { headers }).subscribe(data => {
|
||||
this.active = true
|
||||
console.log(data)
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
tempClearArray(data) {
|
||||
this.DataArray = new Array;
|
||||
}
|
||||
@@ -222,7 +245,9 @@ export class NotificationsService {
|
||||
}
|
||||
else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital']));
|
||||
}
|
||||
} else if (notification.notification.data.Service === "chat") {
|
||||
this.zone.run(() => this.router.navigate(['/home/chat', notification.notification.data.IdObject, 'chat']));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user