mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode
This commit is contained in:
commit
4a8f1d8392
@ -1109,19 +1109,19 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
if !req.DeleteMember {
|
||||
//s.Notification.GroupDismissedNotification(ctx, req)
|
||||
tips := &sdkws.GroupDismissedTips{
|
||||
Group: s.groupDB2PB(group, owner.UserID, uint32(len(userIDs))),
|
||||
OpUser: &sdkws.GroupMemberFullInfo{},
|
||||
}
|
||||
if mcontext.GetOpUserID(ctx) == owner.UserID {
|
||||
tips.OpUser = s.groupMemberDB2PB(owner, 0)
|
||||
} else {
|
||||
tips.OpUser = &sdkws.GroupMemberFullInfo{UserID: mcontext.GetOpUserID(ctx)}
|
||||
}
|
||||
s.Notification.GroupDismissedNotification(ctx, tips)
|
||||
//if !req.DeleteMember {
|
||||
//s.Notification.GroupDismissedNotification(ctx, req)
|
||||
tips := &sdkws.GroupDismissedTips{
|
||||
Group: s.groupDB2PB(group, owner.UserID, uint32(len(userIDs))),
|
||||
OpUser: &sdkws.GroupMemberFullInfo{},
|
||||
}
|
||||
if mcontext.GetOpUserID(ctx) == owner.UserID {
|
||||
tips.OpUser = s.groupMemberDB2PB(owner, 0)
|
||||
} else {
|
||||
tips.OpUser = &sdkws.GroupMemberFullInfo{UserID: mcontext.GetOpUserID(ctx)}
|
||||
}
|
||||
s.Notification.GroupDismissedNotification(ctx, tips)
|
||||
//}
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgRe
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if groupInfo.Status == constant.GroupStatusDismissed {
|
||||
if groupInfo.Status == constant.GroupStatusDismissed && data.MsgData.ContentType != constant.GroupDismissedNotification {
|
||||
return nil, errs.ErrArgs.Wrap("group is dismissed")
|
||||
}
|
||||
if groupInfo.GroupType == constant.SuperGroup {
|
||||
|
@ -213,6 +213,9 @@ func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndVal
|
||||
}
|
||||
|
||||
func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) []interface{} {
|
||||
if ctx == nil {
|
||||
return keysAndValues
|
||||
}
|
||||
operationID := mcontext.GetOperationID(ctx)
|
||||
opUserID := mcontext.GetOpUserID(ctx)
|
||||
connID := mcontext.GetConnID(ctx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user