mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
chat notification added
This commit is contained in:
@@ -13,6 +13,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { NetworkServiceService , ConnectionStatus} from 'src/app/services/network-service.service';
|
||||
import { ChatSystemService } from './chat-system.service';
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -72,7 +73,8 @@ export class MessageService {
|
||||
private AESEncrypt: AESEncrypt,
|
||||
private AttachmentsService: AttachmentsService,
|
||||
private NetworkServiceService: NetworkServiceService,
|
||||
private ChatSystemService: ChatSystemService,) {
|
||||
private ChatSystemService: ChatSystemService,
|
||||
private notificationService: NotificationsService) {
|
||||
}
|
||||
|
||||
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) {
|
||||
@@ -289,7 +291,7 @@ export class MessageService {
|
||||
clearTimeout(this.functionTimer);
|
||||
|
||||
this.redefinedMessage(ChatMessage)
|
||||
|
||||
console.log()
|
||||
}
|
||||
).catch((error) => {
|
||||
clearTimeout(this.functionTimer);
|
||||
@@ -366,9 +368,17 @@ export class MessageService {
|
||||
this.addReceived(user._id)
|
||||
}
|
||||
|
||||
if(!roomObject.isGroup) {
|
||||
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
|
||||
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.username,ChatMessage.msg,this.rid)
|
||||
}
|
||||
|
||||
|
||||
await this.saveChanges()
|
||||
}
|
||||
|
||||
sendNotificaton
|
||||
|
||||
downloadFileMsg() {
|
||||
|
||||
this.downloadLoader = true;
|
||||
|
||||
Reference in New Issue
Block a user