(messageParsed: {
authorId: string;
body: string;
channelId: string;
sentAt: string;
externalMessageId: string;
threadId: string | undefined;
mentions: { usersId: string }[] | undefined;
})
| 156 | } |
| 157 | |
| 158 | async function parseThreadFromMessage(messageParsed: { |
| 159 | authorId: string; |
| 160 | body: string; |
| 161 | channelId: string; |
| 162 | sentAt: string; |
| 163 | externalMessageId: string; |
| 164 | threadId: string | undefined; |
| 165 | mentions: { usersId: string }[] | undefined; |
| 166 | }) { |
| 167 | return { |
| 168 | sentAt: parseDiscordSentAt(messageParsed.sentAt), |
| 169 | channelId: messageParsed.channelId, |
| 170 | externalThreadId: messageParsed.externalMessageId, |
| 171 | messageCount: 1, |
| 172 | slug: slugify(messageParsed.body), |
| 173 | title: null, |
| 174 | lastReplyAt: parseDiscordSentAt(messageParsed.sentAt), |
| 175 | }; |
| 176 | } |
| 177 | |
| 178 | export async function createMessages({ |
| 179 | channel, |
no test coverage detected