From 2547c30bbca1ba9a8e3ac56a96ef813d41c64579 Mon Sep 17 00:00:00 2001 From: Natalie Mclaren Date: Mon, 19 Oct 2026 15:37:40 +0200 Subject: [PATCH] fix: allow channel thread listing with read-only tokens --- src/lib/permissions.test.ts | 1 + src/lib/permissions.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib/permissions.test.ts b/src/lib/permissions.test.ts index ac93fb1..c37c52a 100644 --- a/src/lib/permissions.test.ts +++ b/src/lib/permissions.test.ts @@ -64,6 +64,7 @@ describe('permissions', () => { expect(isMutatingMethod('workspaces.getWorkspaces')).toBe(false) expect(isMutatingMethod('workspaces.getPublicChannels')).toBe(false) expect(isMutatingMethod('threads.getThread')).toBe(false) + expect(isMutatingMethod('threads.getThreads')).toBe(false) expect(isMutatingMethod('threads.getUnread')).toBe(false) expect(isMutatingMethod('comments.getComment')).toBe(false) expect(isMutatingMethod('comments.getComments')).toBe(false) diff --git a/src/lib/permissions.ts b/src/lib/permissions.ts index 22a441a..44afb4f 100644 --- a/src/lib/permissions.ts +++ b/src/lib/permissions.ts @@ -16,6 +16,7 @@ const KNOWN_SAFE_API_METHODS = new Set([ 'workspaceUsers.getWorkspaceUsers', 'workspaceUsers.getUserById', 'threads.getThread', + 'threads.getThreads', 'threads.getUnread', 'comments.getComment', 'comments.getComments',