mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
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:
@@ -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 = "" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user