From 65398fb1472049b996c126957c8660aa20011402 Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Thu, 2 Dec 2021 21:35:01 +0800 Subject: [PATCH 1/2] callback config --- config/config.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 7dd3403b0..02dbc6638 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -79,7 +79,15 @@ rpcport: openImGroupPort: [ 10500 ] openImAuthPort: [ 10600 ] openImPushPort: [ 10700 ] - + c2c: + callbackBeforeSendMsg: + switch: false + timeoutStrategy: 1 #1:send + callbackAfterSendMsg: + switch: false + state: + stateChange: + switch: false rpcregistername: openImUserName: User @@ -139,11 +147,18 @@ tokenpolicy: accessExpire: 7 messagecallback: - callbackSwitch: false callbackUrl: "http://www.xxx.com/msg/judge" #TimeOut use second as unit callbackTimeOut: 10 - + c2c: + callbackBeforeSendMsg: + switch: false + timeoutStrategy: 1 #1:send + callbackAfterSendMsg: + switch: false + state: + stateChange: + switch: false #---------------demo configuration---------------------# #The following configuration items are applied to openIM Demo configuration From f1b51f9c97b7057886d9751ac330be470fe8afcc Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 3 Dec 2021 11:50:30 +0800 Subject: [PATCH 2/2] fix bug: QuitGroup Find ->Scan --- pkg/common/db/mysql_model/im_mysql_model/group_member_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go index 60ad86e85..a31f973e1 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/group_member_model.go @@ -63,7 +63,7 @@ func FindGroupMemberInfoByGroupIdAndUserId(groupId, uid string) (*GroupMember, e return nil, err } var groupMember GroupMember - err = dbConn.Raw("select * from `group_member` where group_id=? and uid=? limit 1", groupId, uid).Scan(&groupMember).Error + err = dbConn.Raw("select * from `group_member` where group_id=? and uid=? limit 1", groupId, uid).Find(&groupMember).Error if err != nil { return nil, err }