Skip to content

Commit 0c5d928

Browse files
authored
fix: allow channel thread listing with read-only tokens (#85)
1 parent 3526db7 commit 0c5d928

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/lib/permissions.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe('permissions', () => {
6666
expect(isMutatingMethod('workspaces.getWorkspaces')).toBe(false)
6767
expect(isMutatingMethod('workspaces.getPublicChannels')).toBe(false)
6868
expect(isMutatingMethod('threads.getThread')).toBe(false)
69+
expect(isMutatingMethod('threads.getThreads')).toBe(false)
6970
expect(isMutatingMethod('threads.getUnread')).toBe(false)
7071
expect(isMutatingMethod('comments.getComment')).toBe(false)
7172
expect(isMutatingMethod('comments.getComments')).toBe(false)

‎src/lib/permissions.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const KNOWN_SAFE_API_METHODS = new Set([
1616
'workspaceUsers.getWorkspaceUsers',
1717
'workspaceUsers.getUserById',
1818
'threads.getThread',
19+
'threads.getThreads',
1920
'threads.getUnread',
2021
'comments.getComment',
2122
'comments.getComments',

0 commit comments

Comments
 (0)