add parameters

This commit is contained in:
Peter Maquiran
2023-08-20 00:26:24 +01:00
parent 8d35abbdd0
commit 6d8e0123b7
18 changed files with 193 additions and 77 deletions
@@ -65,6 +65,23 @@ export class ChatSystemService {
private notificationService: NotificationsService
) {
const user = this.users
const alfa = {}
const sortedUserList = user.sort((a, b) => {
if(a.name < b.name) {
return -1;
}
if(a.name > b.name) {
return 1;
}
return 0;
})
console.log({sortedUserList})
this.RochetChatConnectorService.registerCallback({
type: 'reConnect',
funx: async () => {
+10 -3
View File
@@ -79,7 +79,7 @@ export class MessageService {
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, attachmentsModelData, hasFile = false }:Message) {
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, attachmentsModelData, hasFile = false, UploadAttachmentsTemp = 0 }:Message) {
this.channels = channels || []
this.mentions = mentions || []
@@ -99,6 +99,7 @@ export class MessageService {
this.sendAttempt = 0
this.origin = origin
this.attachmentsModelData = attachmentsModelData
this.UploadAttachmentsTemp = UploadAttachmentsTemp
if(this.attachments?.length >= 1 && attachments?.length >= 1) {
this.attachments[0] = Object.assign(this.attachments[0], attachments[0])
@@ -268,15 +269,20 @@ export class MessageService {
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
this.UploadAttachmentsTemp++
this.uploadingFile = false
this.manualRetry = false
this.errorUploadingAttachment = false
this.hasSendAttachment = true
this.saveChanges()
} catch (error) {
this.uploadingFile = false
this.errorUploadingAttachment = true
this.UploadAttachmentsTemp++
this.saveChanges()
}
}
@@ -513,7 +519,8 @@ export class MessageService {
localReference: this.localReference,
attachments: this.attachments,
file: this.file,
delate: this.delate
delate: this.delate,
UploadAttachmentsTemp: this.UploadAttachmentsTemp
}
}