Refactor moderation notifications: replace NotifyAsync with KickPlayerAsync for player kicks in InGameModerationController and AdminController; update NotificationService to streamline moderation kick payloads.

This commit is contained in:
Alexa
2026-06-02 02:48:04 +03:00
parent 96eb368d41
commit 24c8a920e4
3 changed files with 49 additions and 38 deletions
@@ -136,12 +136,9 @@ public class InGameModerationController(
foreach (var target in ids)
{
logger.LogInformation("[mod] instant-kick by {Caller}: target={Target}", caller, target);
// Push a SignalR ModerationKick notification — the watch's
// PlayerReporting.OnModerationKick handler boots the player
// back to their dorm.
await notifications.NotifyAsync(
target,
Models.Notification.PushNotificationId.ModerationKick);
// Push the ModerationKick shape the 2020.12 client expects:
// Msg.Reason must be a ModerationBlockDetail object.
await notifications.KickPlayerAsync(target, "Instant kick by moderator.");
}
return Ok(new { success = true, error = "" });
}