Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove warning from chat.update #1674

Merged
merged 2 commits into from Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/web-api/src/WebClient.spec.js
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
Expand Up @@ -405,7 +405,7 @@
* **#2**: for each returned file `upload_url`, upload corresponding file to
* URLs returned from step 1 (e.g. https://files.slack.com/upload/v1/...\")
*
* **#3**: Complete uploads {@link https://api.slack.com/methods/files.completeUploadExternal files.completeUploadExternal}

Check warning on line 408 in packages/web-api/src/WebClient.ts

View workflow job for this annotation

GitHub Actions / test (18.x, packages/web-api)

Expected only 0 line after block description

Check warning on line 408 in packages/web-api/src/WebClient.ts

View workflow job for this annotation

GitHub Actions / test (20.x, packages/web-api)

Expected only 0 line after block description
*
* @param options
*/
Expand Down Expand Up @@ -824,7 +824,7 @@
* @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