Compare commits

...

4 Commits

Author SHA1 Message Date
WangZhonghui
08e8253bcf
Merge 5afa9d1e7947fb79f390d44c25268cb0afa4f5ef into 7d6682ca4ba7591b777e117db030b7dbb84f27ed 2025-11-02 12:54:22 +00:00
Monet Lee
7d6682ca4b
fix: update JSON field names to camelCase in conversation structs (#3609) 2025-10-31 06:39:16 +00:00
icey-yu
11358404f9
fix: db manager (#3600) 2025-10-23 07:56:09 +00:00
WangZhonghui
5afa9d1e79
fix: get online users
get online users fail
2025-07-18 11:44:19 +08:00
3 changed files with 56 additions and 54 deletions

View File

@ -2,42 +2,42 @@ package callbackstruct
type CallbackBeforeCreateSingleChatConversationsReq struct {
CallbackCommand `json:"callbackCommand"`
OwnerUserID string `json:"owner_user_id"`
ConversationID string `json:"conversation_id"`
ConversationType int32 `json:"conversation_type"`
UserID string `json:"user_id"`
RecvMsgOpt int32 `json:"recv_msg_opt"`
IsPinned bool `json:"is_pinned"`
IsPrivateChat bool `json:"is_private_chat"`
BurnDuration int32 `json:"burn_duration"`
GroupAtType int32 `json:"group_at_type"`
AttachedInfo string `json:"attached_info"`
OwnerUserID string `json:"ownerUserId"`
ConversationID string `json:"conversationId"`
ConversationType int32 `json:"conversationType"`
UserID string `json:"userId"`
RecvMsgOpt int32 `json:"recvMsgOpt"`
IsPinned bool `json:"isPinned"`
IsPrivateChat bool `json:"isPrivateChat"`
BurnDuration int32 `json:"burnDuration"`
GroupAtType int32 `json:"groupAtType"`
AttachedInfo string `json:"attachedInfo"`
Ex string `json:"ex"`
}
type CallbackBeforeCreateSingleChatConversationsResp struct {
CommonCallbackResp
RecvMsgOpt *int32 `json:"recv_msg_opt"`
IsPinned *bool `json:"is_pinned"`
IsPrivateChat *bool `json:"is_private_chat"`
BurnDuration *int32 `json:"burn_duration"`
GroupAtType *int32 `json:"group_at_type"`
AttachedInfo *string `json:"attached_info"`
RecvMsgOpt *int32 `json:"recvMsgOpt"`
IsPinned *bool `json:"isPinned"`
IsPrivateChat *bool `json:"isPrivateChat"`
BurnDuration *int32 `json:"burnDuration"`
GroupAtType *int32 `json:"groupAtType"`
AttachedInfo *string `json:"attachedInfo"`
Ex *string `json:"ex"`
}
type CallbackAfterCreateSingleChatConversationsReq struct {
CallbackCommand `json:"callbackCommand"`
OwnerUserID string `json:"owner_user_id"`
ConversationID string `json:"conversation_id"`
ConversationType int32 `json:"conversation_type"`
UserID string `json:"user_id"`
RecvMsgOpt int32 `json:"recv_msg_opt"`
IsPinned bool `json:"is_pinned"`
IsPrivateChat bool `json:"is_private_chat"`
BurnDuration int32 `json:"burn_duration"`
GroupAtType int32 `json:"group_at_type"`
AttachedInfo string `json:"attached_info"`
OwnerUserID string `json:"ownerUserId"`
ConversationID string `json:"conversationId"`
ConversationType int32 `json:"conversationType"`
UserID string `json:"userId"`
RecvMsgOpt int32 `json:"recvMsgOpt"`
IsPinned bool `json:"isPinned"`
IsPrivateChat bool `json:"isPrivateChat"`
BurnDuration int32 `json:"burnDuration"`
GroupAtType int32 `json:"groupAtType"`
AttachedInfo string `json:"attachedInfo"`
Ex string `json:"ex"`
}
@ -47,42 +47,42 @@ type CallbackAfterCreateSingleChatConversationsResp struct {
type CallbackBeforeCreateGroupChatConversationsReq struct {
CallbackCommand `json:"callbackCommand"`
OwnerUserID string `json:"owner_user_id"`
ConversationID string `json:"conversation_id"`
ConversationType int32 `json:"conversation_type"`
GroupID string `json:"group_id"`
RecvMsgOpt int32 `json:"recv_msg_opt"`
IsPinned bool `json:"is_pinned"`
IsPrivateChat bool `json:"is_private_chat"`
BurnDuration int32 `json:"burn_duration"`
GroupAtType int32 `json:"group_at_type"`
AttachedInfo string `json:"attached_info"`
OwnerUserID string `json:"ownerUserId"`
ConversationID string `json:"conversationId"`
ConversationType int32 `json:"conversationType"`
GroupID string `json:"groupId"`
RecvMsgOpt int32 `json:"recvMsgOpt"`
IsPinned bool `json:"isPinned"`
IsPrivateChat bool `json:"isPrivateChat"`
BurnDuration int32 `json:"burnDuration"`
GroupAtType int32 `json:"groupAtType"`
AttachedInfo string `json:"attachedInfo"`
Ex string `json:"ex"`
}
type CallbackBeforeCreateGroupChatConversationsResp struct {
CommonCallbackResp
RecvMsgOpt *int32 `json:"recv_msg_opt"`
IsPinned *bool `json:"is_pinned"`
IsPrivateChat *bool `json:"is_private_chat"`
BurnDuration *int32 `json:"burn_duration"`
GroupAtType *int32 `json:"group_at_type"`
AttachedInfo *string `json:"attached_info"`
RecvMsgOpt *int32 `json:"recvMsgOpt"`
IsPinned *bool `json:"isPinned"`
IsPrivateChat *bool `json:"isPrivateChat"`
BurnDuration *int32 `json:"burnDuration"`
GroupAtType *int32 `json:"groupAtType"`
AttachedInfo *string `json:"attachedInfo"`
Ex *string `json:"ex"`
}
type CallbackAfterCreateGroupChatConversationsReq struct {
CallbackCommand `json:"callbackCommand"`
OwnerUserID string `json:"owner_user_id"`
ConversationID string `json:"conversation_id"`
ConversationType int32 `json:"conversation_type"`
GroupID string `json:"group_id"`
RecvMsgOpt int32 `json:"recv_msg_opt"`
IsPinned bool `json:"is_pinned"`
IsPrivateChat bool `json:"is_private_chat"`
BurnDuration int32 `json:"burn_duration"`
GroupAtType int32 `json:"group_at_type"`
AttachedInfo string `json:"attached_info"`
OwnerUserID string `json:"ownerUserId"`
ConversationID string `json:"conversationId"`
ConversationType int32 `json:"conversationType"`
GroupID string `json:"groupId"`
RecvMsgOpt int32 `json:"recvMsgOpt"`
IsPinned bool `json:"isPinned"`
IsPrivateChat bool `json:"isPrivateChat"`
BurnDuration int32 `json:"burnDuration"`
GroupAtType int32 `json:"groupAtType"`
AttachedInfo string `json:"attachedInfo"`
Ex string `json:"ex"`
}

View File

@ -89,7 +89,9 @@ func (a *ApiCmd) runE() error {
&a.apiConfig.Notification,
a.apiConfig,
[]string{},
[]string{},
[]string{
a.apiConfig.Discovery.RpcService.MessageGateway,
},
api.Start,
)
}

View File

@ -73,7 +73,7 @@ func (u *UserMgo) TakeNotification(ctx context.Context, level int64) (user []*mo
}
func (u *UserMgo) TakeGTEAppManagerLevel(ctx context.Context, level int64) (user []*model.User, err error) {
return mongoutil.Find[*model.User](ctx, u.coll, bson.M{"app_manager_level": bson.M{"$gte": level}})
return mongoutil.Find[*model.User](ctx, u.coll, bson.M{"app_manger_level": bson.M{"$gte": level}})
}
func (u *UserMgo) TakeByNickname(ctx context.Context, nickname string) (user []*model.User, err error) {