Skip to content

Commit

Permalink
web-api: Remove warning from chat.update (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline authored Oct 5, 2023
1 parent 6e8a31e commit 4a8eeac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion packages/web-api/src/WebClient.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ describe('WebClient', function () {
{ method: 'chat.postEphemeral', args: { channel: "C123", blocks: [] } },
{ method: 'chat.postMessage', args: { channel: "C123", blocks: [] } },
{ method: 'chat.scheduleMessage', args: { channel: "C123", post_at: "100000000", blocks: [] } },
{ method: 'chat.update', args: { channel: "C123", ts: "123.456", blocks: [] } },
];
const warningTestPatterns = textWarningTestPatterns.concat(attachmentWarningTestPatterns);

Expand Down
2 changes: 1 addition & 1 deletion packages/web-api/src/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ function warnDeprecations(method: string, logger: Logger): void {
* @param options arguments for the Web API method
*/
function warnIfFallbackIsMissing(method: string, logger: Logger, options?: WebAPICallOptions): void {
const targetMethods = ['chat.postEphemeral', 'chat.postMessage', 'chat.scheduleMessage', 'chat.update'];
const targetMethods = ['chat.postEphemeral', 'chat.postMessage', 'chat.scheduleMessage'];
const isTargetMethod = targetMethods.includes(method);

const hasAttachments = (args: WebAPICallOptions) => Array.isArray(args.attachments) && args.attachments.length;
Expand Down

0 comments on commit 4a8eeac

Please sign in to comment.