Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat Signing is Forced for Commands #1262

Closed
WhoTho opened this issue Nov 21, 2023 · 3 comments
Closed

Chat Signing is Forced for Commands #1262

WhoTho opened this issue Nov 21, 2023 · 3 comments

Comments

@WhoTho
Copy link

WhoTho commented Nov 21, 2023

When sending commands through client.chat, chat signing of command arguments is forced despite the client not having profile keys. This causes the "Can't sign message without profile keys, please set valid auth mode" error.

I don't know how chat signing works, but I assume it'll be as easy to fix as changing the signing line in signaturesForCommand to something like:

signatures.push({
  argumentName: fieldName,
  signature:
    client.profileKeys ?
    client.signMessage(signable, ts, salt, preview, acknowledgements) :
    Buffer.alloc(0)
})
@frej4189
Copy link
Contributor

Can be fixed by mirroring the normal chat message signing behaviour (e.g. providing no signature when profile keys are not set)

signature: (client.profileKeys && client._session) ? client.signMessage(message, options.timestamp, options.salt, undefined, acknowledgements) : undefined,

@extremeheat
Copy link
Member

@frej4189 Can you open a PR to fix or show suggested patch?

@extremeheat
Copy link
Member

Should be fixed with #1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants