Commit 0d889c15 authored by helene ortiz's avatar helene ortiz
Browse files

use User instead of EndPoint for event sender

parent 104ebf09
......@@ -84,25 +84,7 @@ public class ChatEvent {
}
}
public String getFormattedSender() {
if (formattedSender == null) {
formattedSender = formatEndPoint(sender);
}
return formattedSender;
}
public boolean comesFromServer() {
return sender.equals(NOMAD);
}
public static String formatEndPoint(String endPoint) {
String formattedEndPoint = endPoint.replace("tcp://", "");
int index = formattedEndPoint.indexOf(":");
if (index != -1) {
formattedEndPoint = formattedEndPoint.substring(0, index);
}
return formattedEndPoint;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment