This commit is contained in:
Peter Maquiran
2022-04-19 16:03:59 +01:00
parent 55f804a5d1
commit e16222e230
9 changed files with 23 additions and 26 deletions
+5 -5
View File
@@ -75,7 +75,7 @@ export class MessageService {
this.msg = msg || ""
this.rid = rid
this.ts = ts
this.u = u || { name: this.usernameToDisplayName(SessionStore.user.RochetChatUser), username: SessionStore.user.RochetChatUser, _id: ""}
this.u = u || { name: this.usernameToDisplayName(SessionStore.user.UserName), username: SessionStore.user.UserName, _id: ""}
this.t = t
this._id = _id
this._updatedAt = _updatedAt || new Date().getTime()
@@ -287,18 +287,18 @@ console.log(params)
isSenderIsNotMe(ChatMessage) {
return SessionStore.user.RochetChatUser != ChatMessage.u.username
return SessionStore.user.UserName != ChatMessage.u.username
}
messageOwnerById(id) {
return SessionStore.user.RochetChatUser != this.u.username
return SessionStore.user.UserName != this.u.username
}
private getChatObj() {
return {
channels: this.channels,
mentions: this.mentions,
//msg: this.AESEncrypt.encrypt(this.msg, SessionStore.user.RochetChatUser),
//msg: this.AESEncrypt.encrypt(this.msg, SessionStore.user.UserName),
msg:this.msg,
rid: this.rid,
ts: this.ts,
@@ -339,7 +339,7 @@ console.log(params)
decryptMessage() {
try {
// this.msg = this.AESEncrypt.decrypt(this.msg, SessionStore.user.RochetChatUser)
// this.msg = this.AESEncrypt.decrypt(this.msg, SessionStore.user.UserName)
} catch (error) {}
}