🐛 Fix channel member able to get empty data

This commit is contained in:
LittleSheep 2025-03-22 13:11:23 +08:00
parent 1c92ea36e3
commit 15c513fe6d

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
localCache "git.solsynth.dev/hypernet/messaging/pkg/internal/cache"
"git.solsynth.dev/hypernet/messaging/pkg/internal/gap"
"git.solsynth.dev/hypernet/passport/pkg/authkit"
@ -46,7 +47,7 @@ func GetChannelMember(user authm.Account, channelId uint) (models.ChannelMember,
if err := database.C.
Where(&models.ChannelMember{AccountID: user.ID, ChannelID: channelId}).
Find(&member).Error; err != nil {
First(&member).Error; err != nil {
return member, err
}