Align GoChat with Chatwoot frontend contracts
This commit is contained in:
@@ -209,7 +209,11 @@ func captainResponseAssistantPayload(resp *model.CaptainAssistantResponse) gin.H
|
||||
}
|
||||
|
||||
func captainResponseDocumentablePayload(resp *model.CaptainAssistantResponse) gin.H {
|
||||
payload := gin.H{"type": resp.DocumentableType, "id": *resp.DocumentableID}
|
||||
documentableType := resp.DocumentableType
|
||||
if documentableType == "CaptainDocument" {
|
||||
documentableType = "Captain::Document"
|
||||
}
|
||||
payload := gin.H{"type": documentableType, "id": *resp.DocumentableID}
|
||||
if resp.DocumentableType == "Conversation" {
|
||||
payload["display_id"] = *resp.DocumentableID
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user