feat: Toggle button for user to reassign replies to conversations if they are away, user status now actually affects the conversation workflow.

Online: Conversations are auto-assigned.
Auto-away (inactivity in browser): Marks agent as away without stopping assignment (nothing changes for agent).
Manual away: Prevents new conversations from being assigned. (option available in the sidebar)
Reassign replies: Customer replies unassigns the conversation, returning it to the team inbox / unassigned inbox.
This commit is contained in:
Abhinav Raut
2025-04-04 03:29:16 +05:30
parent c639bfba40
commit 2a382d6036
21 changed files with 209 additions and 111 deletions

View File

@@ -0,0 +1,18 @@
package migrations
import (
"github.com/jmoiron/sqlx"
"github.com/knadh/koanf/v2"
"github.com/knadh/stuffbin"
)
// V0_6_0 updates the database schema to v0.6.0.
func V0_6_0(db *sqlx.DB, fs stuffbin.FileSystem, ko *koanf.Koanf) error {
_, err := db.Exec(`
ALTER TABLE users ADD COLUMN IF NOT EXISTS reassign_replies BOOL DEFAULT FALSE NOT NULL;
`)
if err != nil {
return err
}
return nil
}