Commit 3608808f authored by ics's avatar ics
Browse files

manage messages for token in chat

parent 70c39db7
......@@ -80,8 +80,7 @@ public class ChatEvent {
public String getFormattedSender() {
if (formattedSender == null) {
formattedSender = sender.replace("tcp://", "");
formattedSender = formattedSender.substring(0, formattedSender.indexOf(":"));
formattedSender = formatEndPoint(sender);
}
return formattedSender;
}
......@@ -89,4 +88,12 @@ public class ChatEvent {
public boolean comesFromServer() {
return sender.equals(NOMAD);
}
public static String formatEndPoint(String endPoint) {
String formattedEndPoint = endPoint.replace("tcp://", "");
formattedEndPoint = formattedEndPoint.substring(0, formattedEndPoint.indexOf(":"));
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