Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3113 Player status check is added before accepting invitation #3129

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.faforever.client.notification.Severity;
import com.faforever.client.notification.TransientNotification;
import com.faforever.client.player.PlayerService;
import com.faforever.client.player.ServerStatus;
import com.faforever.client.preferences.MatchmakerPrefs;
import com.faforever.client.preferences.PreferencesService;
import com.faforever.client.remote.FafServerAccessor;
Expand Down Expand Up @@ -478,6 +479,11 @@
return;
}

if (player.getServerStatus() == ServerStatus.OFFLINE) {
notificationService.addImmediateWarnNotification("teammatchmaking.notification.hostIsOffline.message");
return;

Check warning on line 484 in src/main/java/com/faforever/client/teammatchmaking/TeamMatchmakingService.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/faforever/client/teammatchmaking/TeamMatchmakingService.java#L483-L484

Added lines #L483 - L484 were not covered by tests
}

fafServerAccessor.acceptPartyInvite(player);
navigationHandler.navigateTo(new OpenTeamMatchmakingEvent());
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,8 @@ teammatchmaking.notification.customAlreadyInQueue.title = You are already search
teammatchmaking.notification.customAlreadyInQueue.message = Please stop searching for a game before joining a custom game
teammatchmaking.notification.gameAlreadyRunning.title = Already in game
teammatchmaking.notification.gameAlreadyRunning.message = You cannot join matchmaking while you're in game
teammatchmaking.notification.hostIsOffline.title = Host is offline
teammatchmaking.notification.hostIsOffline.message = You cannot accept party invitation while the host is offline
teammatchmaking.playerTitle = Playing matchmaking as\:
teammatchmaking.partyTitle = Your party\:
teammatchmaking.queueTitle = Join one or more queues when you are ready\:
Expand Down
Loading