mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: fix the picture
This commit is contained in:
parent
874c0aea12
commit
adc6f76afd
@ -442,12 +442,32 @@ func (m *MessageApi) CallbackExample(c *gin.Context) {
|
|||||||
|
|
||||||
log.ZDebug(c, "callback", "contextAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", content)
|
log.ZDebug(c, "callback", "contextAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", content)
|
||||||
|
|
||||||
mapStruct, err := convertStructToMap(text)
|
mapStruct := make(map[string]any)
|
||||||
|
mapStruct1, err := convertStructToMap(text.SnapshotPicture)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.ZError(c, "CallbackExample struct to map failed", err)
|
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||||
apiresp.GinError(c, errs.ErrInternalServer.WithDetail(err.Error()).Wrap())
|
apiresp.GinError(c, errs.ErrInternalServer.WithDetail(err.Error()).Wrap())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
mapStruct["snapshotPicture"] = mapStruct1
|
||||||
|
|
||||||
|
mapStruct2, err := convertStructToMap(text.BigPicture)
|
||||||
|
if err != nil {
|
||||||
|
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||||
|
apiresp.GinError(c, errs.ErrInternalServer.WithDetail(err.Error()).Wrap())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mapStruct["bigPicture"] = mapStruct2
|
||||||
|
|
||||||
|
mapStruct3, err := convertStructToMap(text.SourcePicture)
|
||||||
|
if err != nil {
|
||||||
|
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||||
|
apiresp.GinError(c, errs.ErrInternalServer.WithDetail(err.Error()).Wrap())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mapStruct["sourcePicture"] = mapStruct3
|
||||||
|
mapStruct["sourcePath"] = text.SourcePath
|
||||||
|
|
||||||
input := &apistruct.SendMsgReq{
|
input := &apistruct.SendMsgReq{
|
||||||
RecvID: req.SendID,
|
RecvID: req.SendID,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user