chat: Only sign command args when profile keys defined (#1257)

This commit is contained in:
Evan Goode 2023-12-17 11:57:34 -05:00 committed by GitHub
parent 827b6cdb61
commit 0ac8c087a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -371,7 +371,7 @@ module.exports = function (client, options) {
command,
timestamp: options.timestamp,
salt: options.salt,
argumentSignatures: signaturesForCommand(command, options.timestamp, options.salt, options.preview, acknowledgements),
argumentSignatures: client.profileKeys ? signaturesForCommand(command, options.timestamp, options.salt, options.preview, acknowledgements) : [],
messageCount: client._lastSeenMessages.pending,
acknowledged
})
@ -381,7 +381,7 @@ module.exports = function (client, options) {
command,
timestamp: options.timestamp,
salt: options.salt,
argumentSignatures: signaturesForCommand(command, options.timestamp, options.salt),
argumentSignatures: client.profileKeys ? signaturesForCommand(command, options.timestamp, options.salt) : [],
signedPreview: options.didPreview,
previousMessages: client._lastSeenMessages.map((e) => ({
messageSender: e.sender,