Skip to content

Commit e989bd7

Browse files
committed
1.add log
2.Message length limit 2048 3.Parameter conversion float64 -> int
1 parent b2258d7 commit e989bd7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

open_im_sdk/ws_wrapper/ws_local_server/ws_conversation_msg.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func (wsRouter *WsFuncRouter) GetOneConversation(input string, operationID strin
140140
}
141141

142142
userWorker := open_im_sdk.GetUserWorker(wsRouter.uId)
143-
userWorker.GetOneConversation(m["sourceID"].(string), m["sessionType"].(int), &BaseSuccFailed{runFuncName(), operationID, wsRouter.uId})
143+
userWorker.GetOneConversation(m["sourceID"].(string), int(m["sessionType"].(float64)), &BaseSuccFailed{runFuncName(), operationID, wsRouter.uId})
144144
}
145145

146146
func (wsRouter *WsFuncRouter) GetMultipleConversation(conversationIDList string, operationID string) {
@@ -256,7 +256,7 @@ func (wsRouter *WsFuncRouter) CreateVideoMessageFromFullPath(input string, opera
256256
if !wsRouter.checkKeysIn(input, operationID, runFuncName(), m, "videoFullPath", "videoType", "duration", "snapshotFullPath") {
257257
return
258258
}
259-
msg := userWorker.CreateVideoMessageFromFullPath(m["videoFullPath"].(string), m["videoType"].(string), m["duration"].(int64), m["snapshotFullPath"].(string))
259+
msg := userWorker.CreateVideoMessageFromFullPath(m["videoFullPath"].(string), m["videoType"].(string), int64(m["duration"].(float64)), m["snapshotFullPath"].(string))
260260
wsRouter.GlobalSendMessage(EventData{cleanUpfuncName(runFuncName()), 0, "", msg, operationID})
261261
}
262262

@@ -286,7 +286,7 @@ func (wsRouter *WsFuncRouter) CreateSoundMessageFromFullPath(input string, opera
286286
if !wsRouter.checkKeysIn(input, operationID, runFuncName(), m, "soundPath", "duration") {
287287
return
288288
}
289-
msg := userWorker.CreateSoundMessageFromFullPath(m["soundPath"].(string), m["duration"].(int64))
289+
msg := userWorker.CreateSoundMessageFromFullPath(m["soundPath"].(string), int64(m["duration"].(float64)))
290290
wsRouter.GlobalSendMessage(EventData{cleanUpfuncName(runFuncName()), 0, "", msg, operationID})
291291
}
292292

0 commit comments

Comments
 (0)