Skip to content

Commit

Permalink
Update the word Capture to Snippet on the Slack response (only) (#296)
Browse files Browse the repository at this point in the history
* update terms

* add changeset
  • Loading branch information
scazan authored Nov 14, 2023
1 parent 0634853 commit 6faa977
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-dancers-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@gitbook/integration-slack': patch
---

Update term used in Save
10 changes: 5 additions & 5 deletions integrations/slack/src/actions/saveThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const RUNTIME_TIME_LIMIT = 30000;
const APP_ORG_URL = 'https://app.gitbook.com/o/';

/**
* Save thread in GitBook as a summary (capture)
* Save thread in GitBook as a summary (snippet)
*/
export async function saveThread(
{
Expand All @@ -28,7 +28,7 @@ export async function saveThread(
// acknowledge the request to the user
notifySavingThread({ channel: channelId, thread_ts, userId }, context, accessToken);

const capturesURL = `${APP_ORG_URL}${installation.target.organization}/captures`;
const snippetsURL = `${APP_ORG_URL}${installation.target.organization}/snippets`;
// In some cases, the runtime limit is reached before the capture is finished (e.g large threads)
// we notify the user before the runtime limit is reached that the capture
const timeoutId = registerNotifyBeforeRuntimeLimit(
Expand All @@ -37,7 +37,7 @@ export async function saveThread(
thread_ts,
userId,
},
capturesURL,
snippetsURL,
context,
accessToken
);
Expand Down Expand Up @@ -267,7 +267,7 @@ function registerNotifyBeforeRuntimeLimit(
thread_ts: string;
userId: string;
},
capturesUrl: string,
snippetsUrl: string,
context: SlackRuntimeContext,
accessToken: string
) {
Expand All @@ -285,7 +285,7 @@ function registerNotifyBeforeRuntimeLimit(
type: 'section',
text: {
type: 'mrkdwn',
text: `Thread is being saved. You'll find the capture in <${capturesUrl}|GitBook> shortly.`,
text: `Thread is being saved. You'll find the snippet in <${snippetsUrl}|GitBook> shortly.`,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions integrations/slack/src/ui/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ export function PagesBlock(params: {
];
}

export function ConversationSavedBlock(captureUrl: string) {
export function ConversationSavedBlock(snippetsUrl: string) {
return [
{
type: 'section',
text: {
type: 'mrkdwn',
text: `:white_check_mark: Conversation saved in <${captureUrl}|GitBook>`,
text: `:white_check_mark: Conversation saved in <${snippetsUrl}|GitBook>`,
},
},
];
Expand Down

0 comments on commit 6faa977

Please sign in to comment.