Don’t show a link to an unknown Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / text / SoneTextParser.java
index 94c3db4..9754ac4 100644 (file)
@@ -182,7 +182,7 @@ public class SoneTextParser implements Parser<SoneTextParserContext> {
                                        if (line.length() >= (next + 7 + 43)) {
                                                String soneId = line.substring(next + 7, next + 50);
                                                Sone sone = soneProvider.getSone(soneId, false);
-                                               if (sone != null) {
+                                               if ((sone != null) && (sone.getName() != null)) {
                                                        parts.add(new SonePart(sone));
                                                } else {
                                                        parts.add(new PlainTextPart(line.substring(next, next + 50)));