Publish current project state
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gochat/gochat/internal/auth"
|
||||
"github.com/gochat/gochat/internal/automation"
|
||||
"github.com/gochat/gochat/internal/model"
|
||||
"github.com/gochat/gochat/internal/service"
|
||||
@@ -100,7 +101,7 @@ func (h *MacroHandler) Create(c *gin.Context) {
|
||||
// set_visibility: Chatwoot forces visibility=personal if user role is agent
|
||||
// Reference: Chatwoot macro.rb set_visibility — self.visibility = :personal if user.agent?
|
||||
role := getRole(c)
|
||||
if role == "agent" {
|
||||
if role == auth.RoleAgent {
|
||||
macro.Visibility = automation.MacroVisibilityPersonal
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user