-
Notifications
You must be signed in to change notification settings - Fork 227
Description
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
metadataormetadataAsStringis 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 [ ])
- bolt (Bolt for Java)
- bolt-{sub modules} (Bolt for Java - optional modules)
- slack-api-client (Slack API Clients)
- slack-api-model (Slack API Data Models)
- slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
- slack-app-backend (The primitive layer of Bolt for Java)
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.