Small fix (unused code)

This commit is contained in:
M66B 2020-09-13 18:07:11 +02:00
parent cc48b5ad69
commit 9d54d89782
1 changed files with 5 additions and 6 deletions

View File

@ -1121,11 +1121,10 @@ public class MessageHelper {
String[] h = origin.split("\\s+");
if (h.length > 1 && h[0].equalsIgnoreCase("from")) {
String host = h[1];
if (host.startsWith("["))
host = host.substring(1);
if (host.endsWith("]"))
host = host.substring(0, host.length() - 1);
if (!TextUtils.isEmpty(host))
int s = origin.indexOf('[');
int e = origin.indexOf(']');
if (s > 0 && e > s + 1)
host = origin.substring(s + 1, e);
return host;
}