Skip to content

Commit 055cfaa

Browse files
committed
Fix inactive friend removal loop
1 parent 535c057 commit 055cfaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/main/java/com/rtm516/mcxboxbroadcast/core/FriendManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ public void init(FriendSyncConfig friendSyncConfig) {
222222
playerHistory.all().forEach((xuid, lastSeen) -> {
223223
if (lastSeen.isBefore(Instant.now().minusSeconds(friendSyncConfig.expireDays() * 24 * 3600))) {
224224
try {
225-
logger.info("Queuing removal of player " + xuid + " from friends due to inactivity");
226-
remove(xuid, xuidGamertagMap.getOrDefault(xuid, "NOT CACHED"));
225+
logger.info("Removing player " + xuid + " from friends due to inactivity");
226+
forceUnfollow(xuid);
227227
} catch (Exception e) {
228228
logger.error("Failed to remove player " + xuid + " from friends for inactivity", e);
229229
}

0 commit comments

Comments
 (0)