( channelId: string, messageTs: string, )
| 379 | * Find a digest by its Slack review message |
| 380 | */ |
| 381 | export async function getDigestByReviewMessage( |
| 382 | channelId: string, |
| 383 | messageTs: string, |
| 384 | ): Promise<DigestRecord | null> { |
| 385 | const result = await query<DigestRecord>( |
| 386 | `SELECT ${DIGEST_COLUMNS} FROM weekly_digests |
| 387 | WHERE review_channel_id = $1 AND review_message_ts = $2`, |
| 388 | [channelId, messageTs], |
| 389 | ); |
| 390 | return result.rows[0] || null; |
| 391 | } |
| 392 | |
| 393 | /** |
| 394 | * Link a sent digest to its published perspective article. |
no outgoing calls
no test coverage detected