final fix

This commit is contained in:
2025-12-12 00:39:08 +01:00
parent 38e99a29e2
commit c00e7cae31
5 changed files with 149 additions and 314 deletions

View File

@@ -292,9 +292,19 @@ public class ChatHandler {
setUserId(prompt(sc));
// Instructions
System.out.print("Welcome "+getUserId());
System.out.println(" -> Type 'exit' to quit.");
printCommands();
}
/**
* Print available commands
*/
private void printCommands() {
System.out.println("\nYou can use the following commands during the chat:");
System.out.println("- To block a contact: -b <contact_id>");
System.out.println("- To unblock a contact: -u <contact_id>");
System.out.println("- To exit the chat: exit");
}
/**
* Prompt for correspondent ID
* @param sc
@@ -309,7 +319,7 @@ public class ChatHandler {
System.out.println(contact + " is currently blocked. Unblock to chat.");
return;
}
System.out.println("You can start with: " + getCorespondent());
System.out.println("You can start chatting with: " + getCorespondent());
}
/**