When using chatPostMessage API with work objects pattern (metadata-only messages), the SDK generates warning logs requesting text parameter even though the message intentionally contains only metadata. This creates unnecessary noise in application logs.
ctx.client().chatPostMessage { req ->
req
.channel(ctx.requestUserId)
.text("____") // unnecessary
.metadataAsString(gson.toJson(metaData))
}
Current Behavior
When sending metadata-only messages using the work objects pattern, the SDK generates warnings even though text is intentionally omitted:
ctx.client().chatPostMessage { req ->
req
.channel(ctx.requestUserId)
.metadataAsString(gson.toJson(metaData))
}
This produces warning logs like: "text parameter is missing" or similar, which clutters application logs when this pattern is used frequently.
Expected Behavior
The SDK should either:
- Provide an explicit option to suppress text validation warnings when metadata is present
- Automatically skip text validation warnings when
metadata or metadataAsString is provided
- Change the default behavior to not generate warnings for metadata-only messages
Proposed Solution
Add a parameter like suppressTextWarning or automatically detect when metadata is present and skip the text validation warning in that case.
Use Case
Work objects pattern is a valid Slack API pattern where messages contain only metadata for application-to-application communication without user-visible text. Generating warnings for this intentional usage creates log pollution and makes it harder to identify genuine issues.
Category (place an x in each of the [ ])
Requirements
Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.
When using
chatPostMessageAPI with work objects pattern (metadata-only messages), the SDK generates warning logs requesting text parameter even though the message intentionally contains only metadata. This creates unnecessary noise in application logs.ctx.client().chatPostMessage { req -> req .channel(ctx.requestUserId) .text("____") // unnecessary .metadataAsString(gson.toJson(metaData)) }Current Behavior
When sending metadata-only messages using the work objects pattern, the SDK generates warnings even though
textis intentionally omitted:ctx.client().chatPostMessage { req -> req .channel(ctx.requestUserId) .metadataAsString(gson.toJson(metaData)) }This produces warning logs like: "text parameter is missing" or similar, which clutters application logs when this pattern is used frequently.
Expected Behavior
The SDK should either:
metadataormetadataAsStringis providedProposed Solution
Add a parameter like
suppressTextWarningor automatically detect when metadata is present and skip the text validation warning in that case.Use Case
Work objects pattern is a valid Slack API pattern where messages contain only metadata for application-to-application communication without user-visible text. Generating warnings for this intentional usage creates log pollution and makes it harder to identify genuine issues.
Category (place an
xin each of the[ ])Requirements
Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. 🙇
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.