Skip to content

Commit

Permalink
Message > MessageElement for Slack
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu committed Nov 13, 2023
1 parent e822617 commit 2108995
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions connectors/src/connectors/slack/bot.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WebClient } from "@slack/web-api";
import { Message } from "@slack/web-api/dist/response/ConversationsHistoryResponse";
import { MessageElement } from "@slack/web-api/dist/response/ConversationsHistoryResponse";
import { ConversationsRepliesResponse } from "@slack/web-api/dist/response/ConversationsRepliesResponse";
import levenshtein from "fast-levenshtein";

Expand Down Expand Up @@ -620,7 +620,7 @@ async function makeContentFragment(
startingAtTs: string | null,
connector: Connector
) {
let allMessages: Message[] = [];
let allMessages: MessageElement[] = [];

let next_cursor = undefined;

Expand Down
8 changes: 4 additions & 4 deletions connectors/src/connectors/slack/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@slack/web-api";
import {
ConversationsHistoryResponse,
Message,
MessageElement,
} from "@slack/web-api/dist/response/ConversationsHistoryResponse";
import {
Channel,
Expand Down Expand Up @@ -361,7 +361,7 @@ export async function syncNonThreaded(
const dataSourceConfig = dataSourceConfigFromConnector(connector);
const client = await getSlackClient(connectorId);
const nextCursor: string | undefined = undefined;
const messages: Message[] = [];
const messages: MessageElement[] = [];

const startTsSec = Math.round(startTsMs / 1000);
const endTsSec = Math.round(endTsMs / 1000);
Expand Down Expand Up @@ -523,7 +523,7 @@ export async function syncThread(
const dataSourceConfig = dataSourceConfigFromConnector(connector);
const slackClient = await getSlackClient(connectorId);

let allMessages: Message[] = [];
let allMessages: MessageElement[] = [];

let next_cursor = undefined;

Expand Down Expand Up @@ -645,7 +645,7 @@ async function processMessageForMentions(

export async function formatMessagesForUpsert(
channelId: string,
messages: Message[],
messages: MessageElement[],
connectorId: ModelId,
slackClient: WebClient
) {
Expand Down

0 comments on commit 2108995

Please sign in to comment.