dont unencrypt initial msg
This commit is contained in:
parent
1e8148641a
commit
f97a110392
1 changed files with 7 additions and 1 deletions
|
|
@ -365,10 +365,16 @@ const processOutgoings = async () => {
|
|||
Object.entries(out.messages),
|
||||
async ([msgID, msg]) => {
|
||||
if (!currentOut.messages[msgID]) {
|
||||
let decryptedBody = ''
|
||||
if (msg.body === Actions.INITIAL_MSG) {
|
||||
decryptedBody = Actions.INITIAL_MSG
|
||||
} else {
|
||||
decryptedBody = await SEA.decrypt(msg.body, mySecret)
|
||||
}
|
||||
// each callback only looks at one particular msgID
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
currentOut.messages[msgID] = {
|
||||
body: await SEA.decrypt(msg.body, mySecret),
|
||||
body: decryptedBody,
|
||||
timestamp: msg.timestamp
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue