mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -37,7 +37,7 @@ export class MessageService {
|
||||
}
|
||||
|
||||
setData({customFields, channels, mentions, msg ,rid ,ts, u, t, _id, _updatedAt, file, attachments, temporaryData}:Message) {
|
||||
this.customFields = customFields
|
||||
this.customFields = customFields
|
||||
this.channels = channels || []
|
||||
this.mentions = mentions || []
|
||||
this.msg = msg || ""
|
||||
@@ -78,7 +78,7 @@ export class MessageService {
|
||||
const firstName = capitalizeTxt(username.split('.')[0])
|
||||
const lastName = capitalizeTxt(username.split('.')[1])
|
||||
return firstName + ' ' + lastName
|
||||
}
|
||||
}
|
||||
|
||||
getFileFromDb() {
|
||||
|
||||
@@ -113,14 +113,14 @@ export class MessageService {
|
||||
if(this.hasSendAttachment == false) {
|
||||
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
|
||||
}
|
||||
|
||||
|
||||
this.uploadingFile = false
|
||||
|
||||
if(uploadSuccessfully || this.hasSendAttachment == false) {
|
||||
this.hasSendAttachment = true
|
||||
this.errorUploadingAttachment = false
|
||||
this.temporaryData = {}
|
||||
|
||||
|
||||
this.WsChatService.send({roomId:this.rid, msg: this.msg, attachments: this.attachments, file: this.file}).then((data: any) => {
|
||||
console.log('send sucees', data.result)
|
||||
let ChatMessage = data.result
|
||||
@@ -133,7 +133,6 @@ export class MessageService {
|
||||
this.WsChatService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx:()=> {
|
||||
alert('reConnect')
|
||||
// this.send()
|
||||
return true
|
||||
}
|
||||
@@ -143,11 +142,11 @@ export class MessageService {
|
||||
|
||||
this.errorUploadingAttachment = true
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
redefinedMessage(messagem, ChatMessage) {
|
||||
redefinedMessage(messagem, ChatMessage) {
|
||||
this.setData(ChatMessage)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user