Develop #1

Open
HadiSharifi wants to merge 7 commits from develop into main
2 changed files with 4 additions and 4 deletions
Showing only changes of commit bb1d441c9b - Show all commits
@@ -12,7 +12,7 @@ import java.nio.file.Paths;
import java.util.Scanner; import java.util.Scanner;
public class chatClient { public class chatClient {
public static void main() { public static void main(String[] args) {
String host = "localhost"; String host = "localhost";
int port = 9000; int port = 9000;
@@ -91,7 +91,7 @@ public class ClientSession implements Runnable {
} }
case PRIVATE_MESSAGE -> { case PRIVATE_MESSAGE -> {
ClientSession receiver = userManager.getUser(msg.getSender()); ClientSession receiver = userManager.getUser(msg.getReceiver());
if (receiver != null) { if (receiver != null) {
receiver.sendMessage(msg); receiver.sendMessage(msg);
} }
@@ -107,7 +107,7 @@ public class ClientSession implements Runnable {
} }
private void handleFileMessage(FileMessage fileMsg) throws IOException { private void handleFileMessage(FileMessage fileMsg) throws IOException {
// Storing the file
var sentPath = FileManager.getSentPath(fileMsg.getSender(), fileMsg.getFilename()); var sentPath = FileManager.getSentPath(fileMsg.getSender(), fileMsg.getFilename());
var recvPath = FileManager.getReceivedPath(fileMsg.getReceiver(), fileMsg.getFilename()); var recvPath = FileManager.getReceivedPath(fileMsg.getReceiver(), fileMsg.getFilename());