Skip to content

Commit

Permalink
bug: fix getFullUser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wubenqi committed Oct 20, 2022
1 parent b599a9c commit 6c7919e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions app/bff/users/internal/core/users.getFullUser_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
chatpb "github.com/teamgram/teamgram-server/app/service/biz/chat/chat"
"github.com/teamgram/teamgram-server/app/service/biz/dialog/dialog"
userpb "github.com/teamgram/teamgram-server/app/service/biz/user/user"

"github.com/zeromicro/go-zero/core/mr"
)

Expand Down Expand Up @@ -161,15 +162,17 @@ func (c *UsersCore) UsersGetFullUser(in *mtproto.TLUsersGetFullUser) (*mtproto.U
}
},
func() {
// theme_emoticon
dialogExt, _ := c.svcCtx.Dao.DialogClient.DialogGetDialogById(c.ctx, &dialog.TLDialogGetDialogById{
UserId: c.MD.UserId,
PeerType: mtproto.PEER_USER,
PeerId: peerId,
})
if dialogExt != nil {
userFull.ThemeEmoticon = mtproto.MakeFlagsString(dialogExt.ThemeEmoticon)
userFull.TtlPeriod = mtproto.MakeFlagsInt32(dialogExt.TtlPeriod)
if peerId != c.MD.UserId {
// theme_emoticon
dialogExt, _ := c.svcCtx.Dao.DialogClient.DialogGetDialogById(c.ctx, &dialog.TLDialogGetDialogById{
UserId: c.MD.UserId,
PeerType: mtproto.PEER_USER,
PeerId: peerId,
})
if dialogExt != nil {
userFull.ThemeEmoticon = mtproto.MakeFlagsString(dialogExt.ThemeEmoticon)
userFull.TtlPeriod = mtproto.MakeFlagsInt32(dialogExt.TtlPeriod)
}
}
})

Expand Down

0 comments on commit 6c7919e

Please sign in to comment.