-
Notifications
You must be signed in to change notification settings - Fork 401
Closed
Labels
priority: lowThis PR should be reviewed after all high and medium PRs.This PR should be reviewed after all high and medium PRs.status: rejectedThis issue is considered rejected. It will not be worked on.This issue is considered rejected. It will not be worked on.type: choreThis PR contains changes that are not covered by other types (stylistic, dependency updates, etc).This PR contains changes that are not covered by other types (stylistic, dependency updates, etc).
Description
Rather than fetchMessages always returning union of FetchMessagesWithActionsResponse and FetchMessagesForChannelsResponse, you can use the value of the includeMessageActions flag in FetchMessagesParameters to narrow the response type like so:
fetchMessages(parameters: History.FetchMessagesParameters & {includeMessageActions: true}): Promise<History.FetchMessagesWithActionsResponse>;
fetchMessages(parameters: History.FetchMessagesParameters & {includeMessageActions?: false}): Promise<History.FetchMessagesForChannelsResponse>;Metadata
Metadata
Assignees
Labels
priority: lowThis PR should be reviewed after all high and medium PRs.This PR should be reviewed after all high and medium PRs.status: rejectedThis issue is considered rejected. It will not be worked on.This issue is considered rejected. It will not be worked on.type: choreThis PR contains changes that are not covered by other types (stylistic, dependency updates, etc).This PR contains changes that are not covered by other types (stylistic, dependency updates, etc).