feat: trigger handoff when agent bot is the actor (#8639)
- This PR adds a feature to auto-trigger handoff events when an Agent bot toggles a conversation status from Pending to Open Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -14,7 +14,7 @@ module AccessTokenAuthHelper
|
||||
render_unauthorized('Invalid Access Token') && return if @access_token.blank?
|
||||
|
||||
@resource = @access_token.owner
|
||||
Current.user = @resource if current_user.is_a?(User)
|
||||
Current.user = @resource if [User, AgentBot].include?(@resource.class)
|
||||
end
|
||||
|
||||
def validate_bot_access_token!
|
||||
|
||||
Reference in New Issue
Block a user