fix(server): deliver attendance rewards through idempotent mail and notify new messages

This commit is contained in:
2026-10-05 14:18:34 +08:00
parent 9ece9d9afa
commit 8d657bf694
12 changed files with 705 additions and 140 deletions
+7
View File
@@ -824,6 +824,10 @@ func serve(args []string) (serveErr error) {
if err != nil {
return fmt.Errorf("load event tasks state: %w", err)
}
if err := mailService.AttachAttendanceRewardEconomy(eventEconomy); err != nil {
return fmt.Errorf("attach attendance mail rewards: %w", err)
}
eventTasksService.AttachAttendanceMail(mailService)
newbieStep, _, err := wire.Varint(login.UserInfo, 39)
if err != nil {
return err
@@ -1091,6 +1095,9 @@ func serve(args []string) (serveErr error) {
if err := game.AttachResponseObserver(eventTasksService); err != nil {
return err
}
if err := game.AttachResponseObserver(mailService); err != nil {
return fmt.Errorf("attach new mail notifications: %w", err)
}
if authService != nil {
if err := game.AttachLoginAuthenticator(authService); err != nil {
return err