X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftext%2FSoneTextParser.kt;h=0063148732a1b09b5c858df59dde1131361179f5;hp=3cd658788afc9fe4045dfc855986b0127d1a13bf;hb=c84755453de2f6a59fc20114aff832b94c8ecd83;hpb=c98ecb933291c5525f444fd4790a80f50973f07d diff --git a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt index 3cd6587..0063148 100644 --- a/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt +++ b/src/main/kotlin/net/pterodactylus/sone/text/SoneTextParser.kt @@ -69,7 +69,7 @@ class SoneTextParser @Inject constructor(private val soneProvider: SoneProvider? SSK, USK -> try { FreenetURI(link).let { uri -> - uri.docName ?: "${uri.keyType}@${uri.routingKey.freenetBase64}" + uri.allMetaStrings?.lastOrNull() ?: uri.docName ?: "${uri.keyType}@${uri.routingKey.freenetBase64}" }.let { FreenetLinkPart(link, it, trusted = context?.routingKey?.contentEquals(FreenetURI(link).routingKey) == true) } } catch (e: MalformedURLException) { PlainTextPart(link)