mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: fix the valiable unused problem
This commit is contained in:
parent
41de2303ce
commit
8525bbd9fd
@ -428,6 +428,9 @@ func (m *MessageApi) CallbackExample(c *gin.Context) {
|
||||
text := apistruct.TextElem{}
|
||||
picture := apistruct.PictureElem{}
|
||||
mapStruct := make(map[string]any)
|
||||
mapStructSnap := make(map[string]interface{})
|
||||
mapStructBig := make(map[string]interface{})
|
||||
mapStructSource := make(map[string]interface{})
|
||||
if req.ContentType == constant.Text {
|
||||
err = json.Unmarshal([]byte(req.Content), &text)
|
||||
if err != nil {
|
||||
@ -458,7 +461,7 @@ func (m *MessageApi) CallbackExample(c *gin.Context) {
|
||||
if len(picture.SnapshotPicture.Type) == 0 {
|
||||
picture.SnapshotPicture.Type = picture.SourcePicture.Type
|
||||
}
|
||||
mapStructSnap := make(map[string]interface{})
|
||||
|
||||
mapStructSnap, err = convertStructToMap(picture.SnapshotPicture)
|
||||
if err != nil {
|
||||
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||
@ -467,7 +470,6 @@ func (m *MessageApi) CallbackExample(c *gin.Context) {
|
||||
}
|
||||
mapStruct["snapshotPicture"] = mapStructSnap
|
||||
|
||||
mapStructBig := make(map[string]interface{})
|
||||
mapStructBig, err = convertStructToMap(picture.BigPicture)
|
||||
if err != nil {
|
||||
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||
@ -476,7 +478,6 @@ func (m *MessageApi) CallbackExample(c *gin.Context) {
|
||||
}
|
||||
mapStruct["bigPicture"] = mapStructBig
|
||||
|
||||
mapStructSource := make(map[string]interface{})
|
||||
mapStructSource, err = convertStructToMap(picture.SourcePicture)
|
||||
if err != nil {
|
||||
log.ZError(c, "CallbackExample struct to map failed", err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user