This commit is contained in:
laodaming
2023-09-04 15:00:11 +08:00
parent f6e2edf3a8
commit 1da29bb715
3 changed files with 10 additions and 6 deletions

View File

@@ -97,8 +97,8 @@ func ConsumeCommonCacheData(ctx context.Context) {
func (l *CommonNotifyLogic) CommonNotify(req *types.CommonNotifyReq, userinfo *auth.UserInfo) (resp *basic.Response) {
searchConnectType := "uniqueId"
if req.Wid == "" {
if !userinfo.IsUser() && !userinfo.IsGuest() {
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "websocket connect id is empty")
if req.UserId == 0 && req.GuestId == 0 {
return resp.SetStatusWithMessage(basic.CodeOK, "用户信息或者连接标识必须保证至少有其中一个")
}
searchConnectType = "userInfo"
}