mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: Change after webhook filter && feat SendSimpleMsg (#3151)
* feat: msg filter and search system account * feat: search system account * chore: msg * chore: msg * chore: msg * chore: webhook filter && sendSimpleMessage
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/model"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/tools/db/pagination"
|
||||
"github.com/openimsdk/tools/db/tx"
|
||||
"github.com/openimsdk/tools/utils/datautil"
|
||||
@@ -37,8 +38,10 @@ type UserDatabase interface {
|
||||
Find(ctx context.Context, userIDs []string) (users []*model.User, err error)
|
||||
// Find userInfo By Nickname
|
||||
FindByNickname(ctx context.Context, nickname string) (users []*model.User, err error)
|
||||
// Find notificationAccounts
|
||||
// FindNotification find system account by level
|
||||
FindNotification(ctx context.Context, level int64) (users []*model.User, err error)
|
||||
// FindSystemAccount find all system account
|
||||
FindSystemAccount(ctx context.Context) (users []*model.User, err error)
|
||||
// Create Insert multiple external guarantees that the userID is not repeated and does not exist in the storage
|
||||
Create(ctx context.Context, users []*model.User) (err error)
|
||||
// UpdateByMap update (zero value) external guarantee userID exists
|
||||
@@ -139,6 +142,10 @@ func (u *userDatabase) FindNotification(ctx context.Context, level int64) (users
|
||||
return u.userDB.TakeNotification(ctx, level)
|
||||
}
|
||||
|
||||
func (u *userDatabase) FindSystemAccount(ctx context.Context) (users []*model.User, err error) {
|
||||
return u.userDB.TakeGTEAppManagerLevel(ctx, constant.AppNotificationAdmin)
|
||||
}
|
||||
|
||||
// Create Insert multiple external guarantees that the userID is not repeated and does not exist in the storage.
|
||||
func (u *userDatabase) Create(ctx context.Context, users []*model.User) (err error) {
|
||||
return u.tx.Transaction(ctx, func(ctx context.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user