H-337: restore Web widget reply visibility (#64)

* H-337: restore widget reply delivery

* H-337: harden widget conversation ownership

---------

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-20 22:22:27 +08:00
committed by GitHub
co-authored by rogee
parent abb1bed424
commit b31b1b9562
22 changed files with 847 additions and 83 deletions
+3 -2
View File
@@ -34,7 +34,7 @@ const (
// ServerConfirmSubscribe acknowledges a successful subscription
ServerConfirmSubscribe ServerMessageType = "confirm_subscription"
// ServerConfirmUnsubscribe acknowledges a successful unsubscribe
ServerConfirmUnsubscribe ServerMessageType = "confirm_unsubscribe" // NOTE: ActionCable uses confirm_subscription for both sub and unsub
ServerConfirmUnsubscribe ServerMessageType = "confirm_unsubscribe" // NOTE: ActionCable uses confirm_subscription for both sub and unsub
// ServerRejectSubscribe rejects a subscription attempt
ServerRejectSubscribe ServerMessageType = "reject_subscription"
// ServerPing is a heartbeat response
@@ -61,13 +61,14 @@ type ChannelIdentifier struct {
Channel string `json:"channel"` // "AccountChannel" or "ConversationChannel"
AccountID uint `json:"account_id"` // required for both channels
ConversationID uint `json:"conversation_id,omitempty"` // required for ConversationChannel
PubsubToken string `json:"pubsub_token,omitempty"` // required for contact RoomChannel
}
// Channel name constants (ActionCable naming style)
const (
ChannelAccount = "AccountChannel"
ChannelConversation = "ConversationChannel"
ChannelRoom = "RoomChannel" // Chatwoot single-subscription channel
ChannelRoom = "RoomChannel" // Chatwoot single-subscription channel
)
// --- Server → Client Frames ---