mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-13 05:25:59 +08:00
Error code standardization
This commit is contained in:
@@ -314,6 +314,12 @@ const (
|
||||
ReliableNotificationNoMsg = 2
|
||||
ReliableNotificationMsg = 3
|
||||
)
|
||||
const (
|
||||
BecomeFriendByImport = 1 //管理员导入
|
||||
BecomeFriendByMyApply = 2 //自己主动申请添加
|
||||
BecomeFriendByPeerApply = 3 //对方主动申请添加
|
||||
BecomeFriendByApply = 4 //自己主动申请添加
|
||||
)
|
||||
|
||||
const (
|
||||
ApplyNeedVerificationInviteDirectly = 0 // 申请需要同意 邀请直接进
|
||||
|
||||
@@ -7,6 +7,16 @@ import (
|
||||
)
|
||||
|
||||
type FriendInterface interface {
|
||||
// CheckIn 检查fromUserID是否在toUserID的好友列表中(inTo==true) 检查toUserID是否在fromUserID的好友列表中(inFrom==true)
|
||||
CheckIn(ctx context.Context, fromUserID, toUserID string) (err error, inTo bool, inFrom bool)
|
||||
// AddFriendRequest 增加或者更新好友申请
|
||||
AddFriendRequest(ctx context.Context, fromUserID, toUserID string, reqMsg string, ex string) (err error)
|
||||
// 先判断是否在好友表,如果在则不插入
|
||||
BecomeFriend(ctx context.Context, friends []*relation.Friend) (err error)
|
||||
//拒绝好友申请
|
||||
RefuseFriendRequest(ctx context.Context, friendRequest *relation.FriendRequest) (err error)
|
||||
// 同意好友申请
|
||||
AgreeFriendRequest(ctx context.Context, friendRequest *relation.FriendRequest) (err error)
|
||||
Create(ctx context.Context, friends []*relation.Friend) (err error)
|
||||
Delete(ctx context.Context, ownerUserID string, friendUserIDs string) (err error)
|
||||
UpdateByMap(ctx context.Context, ownerUserID string, args map[string]interface{}) (err error)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var FriendRequestDB *gorm.DB
|
||||
//var FriendRequestDB *gorm.DB
|
||||
|
||||
type FriendRequest struct {
|
||||
FromUserID string `gorm:"column:from_user_id;primary_key;size:64"`
|
||||
|
||||
Reference in New Issue
Block a user