Compare commits

..

No commits in common. "2648cc5cfe708993897368560595bf6cda164ab7" and "a570e5367a8f8f27c34e330dae4c49fd051f150e" have entirely different histories.

2 changed files with 16 additions and 21 deletions

View File

@ -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)(oldStreamer, req.Streamer)
consts.AudNotifTemp_ShortsChangeApplied, consts.AudNotifTemp_StreamerDirectlyUpdated)(req.Streamer)
return
}

View File

@ -396,10 +396,9 @@ func (handler *NotifBuilderHandler) handleAudRealNameAuthenticationRejected() {
func (handler *NotifBuilderHandler) handleAudBioChangeApplied() {
handler.handlerMap[consts.AudNotifTemp_BioChangeApplied] = func(ctx *gin.Context, args ...any) {
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())
streamer := args[0].(*dbstruct.Streamer)
if streamer.Bio != nil {
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_BioChangeApplied, streamer.GetMid())
}
}
}
@ -421,10 +420,9 @@ func (handler *NotifBuilderHandler) handleAudBioRejected() {
func (handler *NotifBuilderHandler) handleAudAutoResponseMessageChangeApplied() {
handler.handlerMap[consts.AudNotifTemp_AutoResponseMessageChangeApplied] = func(ctx *gin.Context, args ...any) {
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())
streamer := args[0].(*dbstruct.Streamer)
if streamer.AutoResponseMessage != nil {
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AutoResponseMessageChangeApplied, streamer.GetMid())
}
}
}
@ -446,10 +444,9 @@ func (handler *NotifBuilderHandler) handleAudAutoResponseMessageRejected() {
func (handler *NotifBuilderHandler) handleAudCoverChangeApplied() {
handler.handlerMap[consts.AudNotifTemp_CoverChangeApplied] = func(ctx *gin.Context, args ...any) {
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())
streamer := args[0].(*dbstruct.Streamer)
if streamer.Cover != nil {
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_CoverChangeApplied, streamer.GetMid())
}
}
}
@ -471,10 +468,9 @@ func (handler *NotifBuilderHandler) handleAudCoverRejected() {
func (handler *NotifBuilderHandler) handleAudAlbumChangeApplied() {
handler.handlerMap[consts.AudNotifTemp_AlbumChangeApplied] = func(ctx *gin.Context, args ...any) {
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())
streamer := args[0].(*dbstruct.Streamer)
if streamer.Album != nil {
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_AlbumChangeApplied, streamer.GetMid())
}
}
}
@ -496,10 +492,9 @@ func (handler *NotifBuilderHandler) handleAudAlbumRejected() {
func (handler *NotifBuilderHandler) handleAudShortsChangeApplied() {
handler.handlerMap[consts.AudNotifTemp_ShortsChangeApplied] = func(ctx *gin.Context, args ...any) {
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())
streamer := args[0].(*dbstruct.Streamer)
if streamer.Shorts != nil {
DefaultService.utilWriteNotifInfo(ctx, consts.AudNotifTemp_ShortsChangeApplied, streamer.GetMid())
}
}
}