mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 11:37:58 +00:00
Bump version to 2.3.1
This commit is contained in:
@@ -68,7 +68,7 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def agents
|
def agents
|
||||||
@agents ||= Current.account.users.order_by_full_name.includes({ avatar_attachment: [:blob] })
|
@agents ||= Current.account.users.order_by_full_name.includes(:account_users, { avatar_attachment: [:blob] })
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_limit
|
def validate_limit
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ class User < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def current_account_user
|
def current_account_user
|
||||||
account_users.find_by(account_id: Current.account.id) if Current.account
|
# We want to avoid subsequent queries in case where the association is preloaded.
|
||||||
|
# using where here will trigger n+1 queries.
|
||||||
|
account_users.find { |ac_usr| ac_usr.account_id == Current.account.id } if Current.account
|
||||||
end
|
end
|
||||||
|
|
||||||
def available_name
|
def available_name
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
json.id resource.id
|
json.id resource.id
|
||||||
# could be nil for a deleted agent hence the safe operator before account id
|
# could be nil for a deleted agent hence the safe operator before account id
|
||||||
json.account_id resource.account&.id
|
json.account_id Current.account&.id
|
||||||
json.availability_status resource.availability_status
|
json.availability_status resource.availability_status
|
||||||
json.auto_offline resource.auto_offline
|
json.auto_offline resource.auto_offline
|
||||||
json.confirmed resource.confirmed?
|
json.confirmed resource.confirmed?
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
shared: &shared
|
shared: &shared
|
||||||
version: '2.3.0'
|
version: '2.3.1'
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *shared
|
<<: *shared
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@chatwoot/chatwoot",
|
"name": "@chatwoot/chatwoot",
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"eslint": "eslint app/**/*.{js,vue} --fix",
|
"eslint": "eslint app/**/*.{js,vue} --fix",
|
||||||
|
|||||||
Reference in New Issue
Block a user