You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The postReplyInThread method in netlify/functions/save-discussion-background/Slack.ts has a TypeScript error due to incompatible types in the Slack Web API call:
Argumentoftype '{ channel: string; text: string; as_user: true; thread_ts: string; icon_url: string;}' is not assignable to parameter of type 'ChatPostMessageArguments'.Typesofproperty'icon_url'areincompatible.Type'string'isnotassignabletotype'undefined'.
Current Behavior
When posting a reply in a Slack thread, we're trying to set both as_user: true and icon_url
This causes a type error because when posting as a user (as_user: true), Slack automatically uses the user's profile picture
The code currently attempts to override this with a custom icon URL, which is not allowed by the API
Expected behavior
Messages should be posted as the authenticated user with their profile picture
No type errors in the TypeScript compilation
Screenshots
How to Reproduce
View Error:
# Run TypeScript check on the specific file
npx tsc netlify/functions/save-discussion-background/Slack.ts --noEmit
The type error will appear:
Error: Argumentoftype '{ channel: string; text: string; as_user: true; thread_ts: string; icon_url: string;}' is not assignable to parameter of type 'ChatPostMessageArguments'.Typesofproperty'icon_url'areincompatible.Type'string'isnotassignabletotype'never'.
Describe the bug.
The
postReplyInThread
method innetlify/functions/save-discussion-background/Slack.ts
has a TypeScript error due to incompatible types in the Slack Web API call:Current Behavior
as_user: true
andicon_url
as_user: true
), Slack automatically uses the user's profile pictureExpected behavior
Screenshots
How to Reproduce
View Error:
# Run TypeScript check on the specific file npx tsc netlify/functions/save-discussion-background/Slack.ts --noEmit
The type error will appear:
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
The text was updated successfully, but these errors were encountered: