group mute

This commit is contained in:
withchao 2023-06-08 11:42:06 +08:00
parent 296def6596
commit 9069170b3d

View File

@ -91,13 +91,13 @@ func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgRe
if err != nil {
return err
}
if groupMemberInfo.RoleLevel > constant.GroupOrdinaryUsers {
if groupMemberInfo.RoleLevel == constant.GroupOwner {
return nil
} else {
if groupMemberInfo.MuteEndTime >= time.Now().Unix() {
return errs.ErrMutedInGroup.Wrap()
}
if groupInfo.Status == constant.GroupStatusMuted {
if groupInfo.Status == constant.GroupStatusMuted && groupMemberInfo.RoleLevel != constant.GroupAdmin {
return errs.ErrMutedGroup.Wrap()
}
}