Skip to content

Commit 4afbf00

Browse files
committed
style: update context initialization in GetConversationIDBySessionType.
Signed-off-by: Gordon <[email protected]>
1 parent 6130cb9 commit 4afbf00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

open_im_sdk/conversation_msg.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package open_im_sdk
1616

1717
import (
18+
"context"
19+
1820
"github.com/openimsdk/openim-sdk-core/v3/open_im_sdk_callback"
1921
)
2022

@@ -101,9 +103,7 @@ func CreateForwardMessage(operationID string, m string) string {
101103
return syncCall(operationID, UserForSDK.Conversation().CreateForwardMessage, m)
102104
}
103105
func GetConversationIDBySessionType(operationID string, sourceID string, sessionType int) string {
104-
context := UserForSDK.Context()
105-
return UserForSDK.Conversation().GetConversationIDBySessionType(context, sourceID, sessionType)
106-
// return syncCall(operationID, UserForSDK.Conversation().GetConversationIDBySessionType, sourceID, sessionType)
106+
return UserForSDK.Conversation().GetConversationIDBySessionType(context.Background(), sourceID, sessionType)
107107
}
108108
func SendMessage(callback open_im_sdk_callback.SendMsgCallBack, operationID, message, recvID, groupID, offlinePushInfo string, isOnlineOnly bool) {
109109
messageCall(callback, operationID, UserForSDK.Conversation().SendMessage, message, recvID, groupID, offlinePushInfo, isOnlineOnly)

0 commit comments

Comments
 (0)