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

Commit 67b0b21

Browse files
committed
DEV: Load authored pms with any bot id
1 parent 5860655 commit 67b0b21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/controllers/discourse_ai/ai_bot/conversations_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ def index
1414
base_query =
1515
Topic
1616
.private_messages_for_user(current_user)
17+
.where(user_id: current_user.id) # Only show PMs where the current user is the author
1718
.joins(:topic_users)
1819
.where(topic_users: { user_id: bot_user_ids })
1920
.distinct
21+
2022
total = base_query.count
2123
pms = base_query.order(last_posted_at: :desc).offset(page * per_page).limit(per_page)
2224

0 commit comments

Comments
 (0)