mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
1 line
52 KiB
JSON
1 line
52 KiB
JSON
|
|
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport { Injectable } from '@angular/core';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { capitalizeTxt } from 'src/plugin/text';\nimport { NfService } from 'src/app/services/chat/nf.service';\nimport { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';\nimport { showDateDuration } from 'src/plugin/showDateDuration';\nimport { ChatMethodsService } from './chat-methods.service';\nimport { MessageModel } from '../../models/beast-orm';\nimport { AESEncrypt } from '../aesencrypt.service';\nimport { HttpEventType } from '@angular/common/http';\nimport { AttachmentsService } from 'src/app/services/attachments.service';\nimport { NetworkServiceService, ConnectionStatus } from 'src/app/services/network-service.service';\nimport { ChatSystemService } from './chat-system.service';\nimport { v4 as uuidv4 } from 'uuid';\nimport { NotificationsService } from 'src/app/services/notifications.service';\nlet MessageService = class MessageService {\n constructor(NfService, RochetChatConnectorService, ChatMethodsService, AESEncrypt, AttachmentsService, NetworkServiceService, ChatSystemService, notificationService) {\n this.NfService = NfService;\n this.RochetChatConnectorService = RochetChatConnectorService;\n this.ChatMethodsService = ChatMethodsService;\n this.AESEncrypt = AESEncrypt;\n this.AttachmentsService = AttachmentsService;\n this.NetworkServiceService = NetworkServiceService;\n this.ChatSystemService = ChatSystemService;\n this.notificationService = notificationService;\n this.channels = [];\n this.mentions = [];\n this.msg = '';\n this.rid = '';\n this.ts = {};\n this.u = {\n name: '',\n username: '',\n _id: \"\"\n };\n this.t = '';\n this._id = '';\n this.id = ''; // table id\n this.displayType = '';\n this.temporaryData = {};\n this.hasFile = false;\n this.hasSendAttachment = false;\n this.sendAttempt = 0;\n this.uploadingFile = false;\n this.errorUploadingAttachment = false;\n this.loadHistory = false;\n this.duration = '';\n this.localReference = null;\n this.viewed = [];\n this.received = [];\n this.addToDb = false;\n this.messageSend = false;\n this.delate = false;\n this.delateRequest = false;\n this.downloadLoader = false;\n this.downloadAttachments = false;\n this.downloadAttachmentsTemp = 0;\n this.UploadAttachmentsTemp = 0;\n this.manualRetry = false;\n this.functionTimer = null;\n this.earlySave = false;\n }\n setData({\n customFields = {},\n channels,\n mentions,\n msg,\n rid,\n ts,\n u,\n t,\n _id,\n id,\n _updatedAt,\n file,\n attachments,\n temporaryData,\n localReference = 'out-' + uuidv4(),\n viewed = [],\n received = [],\n delate = false,\n delateRequest = false,\n from,\n sendAttempt = 0,\n origin\n }) {\n this.channels = channels || [];\n this.mentions = mentions || [];\n this.msg = msg || \"\";\n this.rid = rid;\n this.ts = ts;\n this.u = u || {\n name: this.usernameToDisplayName(SessionStore.user.UserName),\n username: SessionStore.user.UserName,\n _id: \"\"\n };\n this.t = t;\n this._id = _id || \"\";\n this._updatedAt = _updatedAt || new Date().getTime();\n this.file = file;\n this.temporaryData = temporaryData;\n this.localReference = localReference || null;\n this.id = id;\n this.delate = delate;\n this.delateRequest = delateRequest;\n this.sendAttempt = 0;\n this.origin = origin;\n if (this.attachments?.length >= 1 && attachments?.length >= 1) {\n this.attachments[0] = Object.assign(this.attachments[0], attachments[0]);\n } else {\n this.attachments = attachments;\n }\n this.viewed = [...new Set([...viewed, ...this.viewed])];\n th
|