[PR #23232] fix(api): "Message not exists" error while creating feedback by admin #30208

Closed
opened 2026-02-21 20:47:03 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23232

State: closed
Merged: Yes


PR #22580 introduced a regression in the admin feedback functionality. The original code correctly
allowed dashboard users to create/update feedback on any message within an app they have access to,
filtering only by app_id and message_id.

The refactored code, while appearing consistent with the existing codebase, inadvertently added user-specific
filtering through MessageService.get_message(). This method filters messages by the current dashboard
user's ID (from_account_id), breaking the intended behavior.

Reproduction scenario:

  1. EndUser with ID end_user_123 creates a message
  2. Dashboard user with ID dashboard_user_456 attempts to create feedback via the admin API

Result:

  • Original code: Successfully finds the message and creates feedback
  • Refactored code: Fails with "Message not exists" error due to user ID mismatch

The refactored implementation incorrectly filters messages when admin is creating feedbacks,
which contradicts the intended admin workflow where any authorized dashboard user should be able
to moderate any message within their accessible apps.

**Original Pull Request:** https://github.com/langgenius/dify/pull/23232 **State:** closed **Merged:** Yes --- PR #22580 introduced a regression in the admin feedback functionality. The original code correctly allowed dashboard users to create/update feedback on any message within an app they have access to, filtering only by `app_id` and `message_id`. The refactored code, while appearing consistent with the existing codebase, inadvertently added user-specific filtering through `MessageService.get_message()`. This method filters messages by the current dashboard user's ID (`from_account_id`), breaking the intended behavior. Reproduction scenario: 1. EndUser with ID `end_user_123` creates a message 2. Dashboard user with ID `dashboard_user_456` attempts to create feedback via the admin API Result: - Original code: Successfully finds the message and creates feedback - Refactored code: Fails with "Message not exists" error due to user ID mismatch The refactored implementation incorrectly filters messages when admin is creating feedbacks, which contradicts the intended admin workflow where any authorized dashboard user should be able to moderate any message within their accessible apps.
yindo added the pull-request label 2026-02-21 20:47:03 -05:00
yindo closed this issue 2026-02-21 20:47:03 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30208