Merge pull request 'by Robin at 20241224' (#925) from feat-IRONFANS-212-Robin into test
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/service/pulls/925
This commit is contained in:
commit
2648cc5cfe
app/mix/service
|
@ -1476,7 +1476,7 @@ func (s *Service) ApiUpdateStreamer(ctx *gin.Context, req *streamerproto.ApiUpda
|
|||
DefaultNotifBuilderHandler.Handle(ctx)(
|
||||
consts.AudNotifTemp_BioChangeApplied, consts.AudNotifTemp_AutoResponseMessageChangeApplied,
|
||||
consts.AudNotifTemp_CoverChangeApplied, consts.AudNotifTemp_AlbumChangeApplied,
|
||||
consts.AudNotifTemp_ShortsChangeApplied, consts.AudNotifTemp_StreamerDirectlyUpdated)(req.Streamer)
|
||||
consts.AudNotifTemp_ShortsChangeApplied, consts.AudNotifTemp_StreamerDirectlyUpdated)(oldStreamer, req.Streamer)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
@ -396,9 +396,10 @@ func (handler *NotifBuilderHandler) handleAudRealNameAuthenticationRejected() {
|
|||
|
||||
func (handler *NotifBuilderHandler) handleAudBioChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_BioChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
if streamer.Bio != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_BioChangeApplied, streamer.GetMid())
|
||||
oldStreamer := args[0].(*dbstruct.Streamer)
|
||||
newStreamer := args[1].(*dbstruct.Streamer)
|
||||
if newStreamer.Bio != nil && oldStreamer.GetBio() != newStreamer.GetBio() {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_BioChangeApplied, newStreamer.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -420,9 +421,10 @@ func (handler *NotifBuilderHandler) handleAudBioRejected() {
|
|||
|
||||
func (handler *NotifBuilderHandler) handleAudAutoResponseMessageChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_AutoResponseMessageChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
if streamer.AutoResponseMessage != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AutoResponseMessageChangeApplied, streamer.GetMid())
|
||||
oldStreamer := args[0].(*dbstruct.Streamer)
|
||||
newStreamer := args[1].(*dbstruct.Streamer)
|
||||
if newStreamer.AutoResponseMessage != nil && oldStreamer.GetAutoResponseMessage() != newStreamer.GetAutoResponseMessage() {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AutoResponseMessageChangeApplied, newStreamer.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -444,9 +446,10 @@ func (handler *NotifBuilderHandler) handleAudAutoResponseMessageRejected() {
|
|||
|
||||
func (handler *NotifBuilderHandler) handleAudCoverChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_CoverChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
if streamer.Cover != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_CoverChangeApplied, streamer.GetMid())
|
||||
oldStreamer := args[0].(*dbstruct.Streamer)
|
||||
newStreamer := args[1].(*dbstruct.Streamer)
|
||||
if newStreamer.Cover != nil && !util.IsInt64SliceEqualAsSet(oldStreamer.Cover.GetImageIds(), newStreamer.Cover.GetImageIds()) {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_CoverChangeApplied, newStreamer.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -468,9 +471,10 @@ func (handler *NotifBuilderHandler) handleAudCoverRejected() {
|
|||
|
||||
func (handler *NotifBuilderHandler) handleAudAlbumChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_AlbumChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
if streamer.Album != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AlbumChangeApplied, streamer.GetMid())
|
||||
oldStreamer := args[0].(*dbstruct.Streamer)
|
||||
newStreamer := args[1].(*dbstruct.Streamer)
|
||||
if newStreamer.Album != nil && !util.IsInt64SliceEqualAsSet(oldStreamer.Album.GetImageIds(), newStreamer.Album.GetImageIds()) {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AlbumChangeApplied, newStreamer.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -492,9 +496,10 @@ func (handler *NotifBuilderHandler) handleAudAlbumRejected() {
|
|||
|
||||
func (handler *NotifBuilderHandler) handleAudShortsChangeApplied() {
|
||||
handler.handlerMap[consts.AudNotifTemp_ShortsChangeApplied] = func(ctx *gin.Context, args ...any) {
|
||||
streamer := args[0].(*dbstruct.Streamer)
|
||||
if streamer.Shorts != nil {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_ShortsChangeApplied, streamer.GetMid())
|
||||
oldStreamer := args[0].(*dbstruct.Streamer)
|
||||
newStreamer := args[1].(*dbstruct.Streamer)
|
||||
if newStreamer.Shorts != nil && !util.IsInt64SliceEqualAsSet(oldStreamer.Shorts.GetVideoIds(), newStreamer.Shorts.GetVideoIds()) {
|
||||
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_ShortsChangeApplied, newStreamer.GetMid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue