diff --git a/build.gradle.kts b/build.gradle.kts index bd7378a..2b549ee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ val ownerID = 372703841151614976L group = "net.moonleay.rssbot" version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_SHORT_SHA")}-prod" } ?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" } - ?: "0.3.4" + ?: "0.3.3" val kordver = "1.5.10-SNAPSHOT" val coroutinesver = "1.7.3" diff --git a/src/main/kotlin/net/moonleay/rssbot/jobs/FeedUpdater.kt b/src/main/kotlin/net/moonleay/rssbot/jobs/FeedUpdater.kt index 2253b5a..0a9ea24 100644 --- a/src/main/kotlin/net/moonleay/rssbot/jobs/FeedUpdater.kt +++ b/src/main/kotlin/net/moonleay/rssbot/jobs/FeedUpdater.kt @@ -94,10 +94,10 @@ object FeedUpdater : ICronjob { if (rssData.description == null) "No description" else Remark(EmbedUtil.getHTMLtoMarkdownOptions()).convertFragment( rssData.description!! ), - rssData.link ?: "https://moonleay.net/404", + rssData.link ?: "https://moonleay.net/", rssData.image ?: "", if (rssData.link != null) EmbedUtil.getSiteLogo(rssData.link!!) else "https://static.moonleay.net/img/rssbot/no-image.png", - data.feedName, + "Manual Feed", rssData.pubDate ?: "unknown" ) ) diff --git a/src/main/kotlin/net/moonleay/rssbot/util/MessageUtil.kt b/src/main/kotlin/net/moonleay/rssbot/util/MessageUtil.kt index f4848d0..21b109e 100644 --- a/src/main/kotlin/net/moonleay/rssbot/util/MessageUtil.kt +++ b/src/main/kotlin/net/moonleay/rssbot/util/MessageUtil.kt @@ -178,27 +178,15 @@ object MessageUtil { ): EmbedBuilder { val ebb = EmbedBuilder() val now: LocalDateTime = LocalDateTime.now() - var desc = if (description != "No description") description else "" - val articleLink = "\n[[open full article]($url)]" - if (title.length > 255){ - ebb.title = title.substring(0, 252) + "..." - if (title != desc) - desc = "..." + title.substring(252, title.length) + "\n\n" + desc - } + if (title.length > 25) + ebb.title = title.substring(0, 25) + "..." else ebb.title = title - var athr = author - if (author.length > 255) { - athr = author.substring(0, 252) + "..." - } ebb.author { - this.name = athr + this.name = author this.icon = logo } - if (desc.length > 4096 - 2 - articleLink.length){ - desc = desc.substring(0, 4096 - 2 - articleLink.length) + "..." - } - ebb.description = "${desc}${articleLink}" + ebb.description = "${if (description != "No description") description else ""}\n[[open full article]($url)]" ebb.color = color.color.color ebb.footer { this.text = "> rssbot, ($feedName) \n/ pub $published \n/ rel ${dtf.format(now)}"