Align GoChat with Chatwoot frontend contracts
This commit is contained in:
@@ -30,9 +30,9 @@ import (
|
||||
|
||||
const (
|
||||
// Message topics (ref: Chatwoot MessageCreated/MessageUpdated events)
|
||||
TopicMessageCreated = "gochat.message.created"
|
||||
TopicMessageUpdated = "gochat.message.updated"
|
||||
TopicMessageDeleted = "gochat.message.deleted"
|
||||
TopicMessageCreated = "gochat.message.created"
|
||||
TopicMessageUpdated = "gochat.message.updated"
|
||||
TopicMessageDeleted = "gochat.message.deleted"
|
||||
|
||||
// Conversation topics (ref: Chatwoot ConversationStatusChanged events)
|
||||
TopicConversationCreated = "gochat.conversation.created"
|
||||
@@ -40,14 +40,14 @@ const (
|
||||
TopicConversationResolved = "gochat.conversation.resolved"
|
||||
TopicConversationAssigned = "gochat.conversation.assigned"
|
||||
// 1:1 Chatwoot: additional conversation events
|
||||
TopicConversationStatusChanged = "gochat.conversation.status_changed"
|
||||
TopicConversationContactChanged = "gochat.conversation.contact_changed"
|
||||
TopicConversationRead = "gochat.conversation.read"
|
||||
TopicConversationStatusChanged = "gochat.conversation.status_changed"
|
||||
TopicConversationContactChanged = "gochat.conversation.contact_changed"
|
||||
TopicConversationRead = "gochat.conversation.read"
|
||||
TopicConversationUnreadCountChanged = "gochat.conversation.unread_count_changed"
|
||||
TopicConversationMentioned = "gochat.conversation.mentioned"
|
||||
TopicAssigneeChanged = "gochat.conversation.assignee_changed"
|
||||
TopicTeamChanged = "gochat.conversation.team_changed"
|
||||
TopicFirstReplyCreated = "gochat.message.first_reply_created"
|
||||
TopicConversationMentioned = "gochat.conversation.mentioned"
|
||||
TopicAssigneeChanged = "gochat.conversation.assignee_changed"
|
||||
TopicTeamChanged = "gochat.conversation.team_changed"
|
||||
TopicFirstReplyCreated = "gochat.message.first_reply_created"
|
||||
|
||||
// Contact topics (ref: Chatwoot ContactCreated/ContactUpdated events)
|
||||
TopicContactCreated = "gochat.contact.created"
|
||||
@@ -72,14 +72,15 @@ const (
|
||||
TopicWebhookReceived = "gochat.webhook.received"
|
||||
TopicSystemNotification = "gochat.system.notification"
|
||||
TopicNotificationCreated = "gochat.notification.created"
|
||||
TopicNotificationUpdated = "gochat.notification.updated"
|
||||
TopicNotificationDeleted = "gochat.notification.deleted"
|
||||
|
||||
// Account topics
|
||||
TopicAccountCacheInvalidated = "gochat.account.cache_invalidated"
|
||||
|
||||
// AccountUser topics — 1:1 Chatwoot: after_create_commit/after_destroy callbacks
|
||||
TopicAccountUserCreated = "gochat.account_user.created"
|
||||
TopicAccountUserUpdated = "gochat.account_user.updated"
|
||||
TopicAccountUserCreated = "gochat.account_user.created"
|
||||
TopicAccountUserUpdated = "gochat.account_user.updated"
|
||||
TopicAccountUserDestroyed = "gochat.account_user.destroyed"
|
||||
)
|
||||
|
||||
@@ -201,4 +202,4 @@ func (l *zapLoggerAdapter) Trace(msg string, fields watermill.LogFields) {
|
||||
|
||||
func (l *zapLoggerAdapter) With(fields watermill.LogFields) watermill.LoggerAdapter {
|
||||
return l // No field enrichment needed — zap handles structured logging via .L()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user