Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bunfig.e2e.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[test]
root = "./e2e"
preload = ["./e2e/setup.ts"]
timeout = 30000
17 changes: 9 additions & 8 deletions e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ export async function cleanupMessages(
channel: string,
messageIds: string[]
): Promise<void> {
for (const id of messageIds) {
try {
await deleteTestMessage(platform, channel, id)
await waitForRateLimit(500)
} catch (error) {
console.warn(`Failed to cleanup message ${id}:`, error)
}
}
await Promise.all(
messageIds.map(async (id) => {
try {
await deleteTestMessage(platform, channel, id)
} catch (error) {
console.warn(`Failed to cleanup message ${id}:`, error)
}
})
)
}
4 changes: 2 additions & 2 deletions src/platforms/slack/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,10 @@ export class SlackClient {

async getUnreadCounts(): Promise<SlackUnreadCounts> {
return this.withRetry(async () => {
const response = await (this.client as any).client.counts()
const response = await this.client.apiCall('client.counts')
this.checkResponse(response)

const channels = (response.channels || []).map((ch: any) => ({
const channels = ((response as any).channels || []).map((ch: any) => ({
id: ch.id || '',
name: ch.name || '',
unread_count: ch.unread_count || 0,
Expand Down