Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 9e44d05

Browse files
committed
DEV: Only override sidebar on specific pm conditions
1 parent 67b0b21 commit 9e44d05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

assets/javascripts/initializers/ai-conversations-sidebar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,11 @@ export default {
232232
}
233233

234234
const topic = api.container.lookup("controller:topic").model;
235+
// if the topic is not a private message, not created by the current user,
236+
// or doesn't have a bot response, we don't need to override sidebar
235237
if (
236238
topic?.archetype === "private_message" &&
239+
topic.user_id === currentUser.id &&
237240
topic.postStream.posts.some((post) =>
238241
isPostFromAiBot(post, currentUser)
239242
)

0 commit comments

Comments
 (0)