Skip to content
Snippets Groups Projects
Commit 0d889c15 authored by helene ortiz's avatar helene ortiz
Browse files

use User instead of EndPoint for event sender

parent 104ebf09
Branches
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment