chore: 提交剩余开发改动
包含商务通消息映射、会话时间与未读状态、前端消息展示、数据库修复迁移、测试覆盖备份及 Captain 设计文档。
This commit is contained in:
@@ -1393,14 +1393,15 @@ func widgetContactFullPayload(contact *model.Contact) gin.H {
|
||||
|
||||
func bindPublicContactRequest(c *gin.Context) (service.PublicContactRequest, error) {
|
||||
var body struct {
|
||||
SourceID string `json:"source_id"`
|
||||
Identifier string `json:"identifier"`
|
||||
IdentifierHash string `json:"identifier_hash"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
CustomAttributes map[string]any `json:"custom_attributes"`
|
||||
SourceID string `json:"source_id"`
|
||||
Identifier string `json:"identifier"`
|
||||
IdentifierHash string `json:"identifier_hash"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
PhoneNumber string `json:"phone_number"`
|
||||
CustomAttributes map[string]any `json:"custom_attributes"`
|
||||
AdditionalAttributes map[string]any `json:"additional_attributes"`
|
||||
}
|
||||
if err := c.ShouldBindJSON(&body); err != nil && c.Request.ContentLength != 0 {
|
||||
return service.PublicContactRequest{}, err
|
||||
@@ -1415,14 +1416,15 @@ func bindPublicContactRequest(c *gin.Context) (service.PublicContactRequest, err
|
||||
body.IdentifierHash = c.Query("identifier_hash")
|
||||
}
|
||||
return service.PublicContactRequest{
|
||||
SourceID: body.SourceID,
|
||||
Identifier: body.Identifier,
|
||||
IdentifierHash: body.IdentifierHash,
|
||||
Email: body.Email,
|
||||
Name: body.Name,
|
||||
AvatarURL: body.AvatarURL,
|
||||
PhoneNumber: body.PhoneNumber,
|
||||
CustomAttributes: body.CustomAttributes,
|
||||
SourceID: body.SourceID,
|
||||
Identifier: body.Identifier,
|
||||
IdentifierHash: body.IdentifierHash,
|
||||
Email: body.Email,
|
||||
Name: body.Name,
|
||||
AvatarURL: body.AvatarURL,
|
||||
PhoneNumber: body.PhoneNumber,
|
||||
CustomAttributes: body.CustomAttributes,
|
||||
AdditionalAttributes: body.AdditionalAttributes,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user