mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-13 16:47:36 +08:00
cicd: robot automated Change
This commit is contained in:
parent
4c1f797a82
commit
3cf89a4cbd
@ -18,6 +18,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/protocol/conversation"
|
"github.com/OpenIMSDK/protocol/conversation"
|
||||||
|
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
|
"github.com/openimsdk/open-im-server/v3/pkg/msgprocessor"
|
||||||
@ -235,7 +236,10 @@ func (p *Pusher) Push2SuperGroup(ctx context.Context, groupID string, msg *sdkws
|
|||||||
if len(offlinePushUserIDs) > 0 {
|
if len(offlinePushUserIDs) > 0 {
|
||||||
needOfflinePushUserIDs = offlinePushUserIDs
|
needOfflinePushUserIDs = offlinePushUserIDs
|
||||||
}
|
}
|
||||||
resp, err := p.conversationRpcClient.Client.GetConversationNeedOfflinePushUserIDs(ctx, &conversation.GetConversationNeedOfflinePushUserIDsReq{ConversationID: utils.GenGroupConversationID(groupID), OwnerUserIDs: needOfflinePushUserIDs})
|
resp, err := p.conversationRpcClient.Client.GetConversationNeedOfflinePushUserIDs(
|
||||||
|
ctx,
|
||||||
|
&conversation.GetConversationNeedOfflinePushUserIDsReq{ConversationID: utils.GenGroupConversationID(groupID), OwnerUserIDs: needOfflinePushUserIDs},
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -301,7 +301,10 @@ func (c *conversationServer) GetConversationsByConversationID(
|
|||||||
return &pbconversation.GetConversationsByConversationIDResp{Conversations: convert.ConversationsDB2Pb(conversations)}, nil
|
return &pbconversation.GetConversationsByConversationIDResp{Conversations: convert.ConversationsDB2Pb(conversations)}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *conversationServer) GetConversationNeedOfflinePushUserIDs(ctx context.Context, req *pbconversation.GetConversationNeedOfflinePushUserIDsReq) (*pbconversation.GetConversationNeedOfflinePushUserIDsResp, error) {
|
func (c *conversationServer) GetConversationNeedOfflinePushUserIDs(
|
||||||
|
ctx context.Context,
|
||||||
|
req *pbconversation.GetConversationNeedOfflinePushUserIDsReq,
|
||||||
|
) (*pbconversation.GetConversationNeedOfflinePushUserIDsResp, error) {
|
||||||
if req.ConversationID == "" {
|
if req.ConversationID == "" {
|
||||||
return nil, errs.ErrArgs.Wrap("conversationID is empty")
|
return nil, errs.ErrArgs.Wrap("conversationID is empty")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ package relation
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
@ -218,5 +219,11 @@ func (c *ConversationGorm) GetConversationIDsNeedDestruct(
|
|||||||
|
|
||||||
func (c *ConversationGorm) GetConversationNeedOfflinePushUserIDs(ctx context.Context, conversationID string, ownerUserIDs []string) ([]string, error) {
|
func (c *ConversationGorm) GetConversationNeedOfflinePushUserIDs(ctx context.Context, conversationID string, ownerUserIDs []string) ([]string, error) {
|
||||||
var userIDs []string
|
var userIDs []string
|
||||||
return userIDs, errs.Wrap(c.db(ctx).Model(&relation.ConversationModel{}).Where("conversation_id = ? and owner_user_id in ? and recv_msg_opt = ?", conversationID, ownerUserIDs, constant.ReceiveMessage).Pluck("owner_user_id", &userIDs).Error)
|
return userIDs, errs.Wrap(
|
||||||
|
c.db(ctx).
|
||||||
|
Model(&relation.ConversationModel{}).
|
||||||
|
Where("conversation_id = ? and owner_user_id in ? and recv_msg_opt = ?", conversationID, ownerUserIDs, constant.ReceiveMessage).
|
||||||
|
Pluck("owner_user_id", &userIDs).
|
||||||
|
Error,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user