Describe the bug.
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:
Argument of type '{ channel: string; text: string; as_user: true; thread_ts: string; icon_url: string; }' is not assignable to parameter of type 'ChatPostMessageArguments'.
Types of property 'icon_url' are incompatible.
Type 'string' is not assignable to type '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: Argument of type '{ channel: string; text: string; as_user: true; thread_ts: string; icon_url: string; }' is not assignable to parameter of type 'ChatPostMessageArguments'.
Types of property 'icon_url' are incompatible.
Type 'string' is not assignable to type 'never'.
🥦 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!
Describe the bug.
The
postReplyInThreadmethod innetlify/functions/save-discussion-background/Slack.tshas a TypeScript error due to incompatible types in the Slack Web API call:Current Behavior
as_user: trueandicon_urlas_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 --noEmitThe 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!