Fix in-app notification "null"
This commit is contained in:
parent
ebab2cfa11
commit
628c3fc764
app/lib/methods/subscriptions
|
@ -399,14 +399,16 @@ export default function subscribeRooms() {
|
|||
|
||||
// If it's from a encrypted room
|
||||
if (message?.t === E2E_MESSAGE_TYPE) {
|
||||
// Decrypt this message content
|
||||
const { msg } = await Encryption.decryptMessage({ ...message, rid });
|
||||
// If it's a direct the content is the message decrypted
|
||||
if (room.t === 'd') {
|
||||
notification.text = msg;
|
||||
// If it's a private group we should add the sender name
|
||||
} else {
|
||||
notification.text = `${getSenderName(sender)}: ${msg}`;
|
||||
if (message.msg) {
|
||||
// Decrypt this message content
|
||||
const { msg } = await Encryption.decryptMessage({ ...message, rid });
|
||||
// If it's a direct the content is the message decrypted
|
||||
if (room.t === 'd') {
|
||||
notification.text = msg;
|
||||
// If it's a private group we should add the sender name
|
||||
} else {
|
||||
notification.text = `${getSenderName(sender)}: ${msg}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in New Issue