Skip to content

Commit e64f297

Browse files
committed
Allow previews for scheduled posts
1 parent 11ed1a5 commit e64f297

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

herald/src/main/kotlin/by/jprof/telegram/bot/herald/impl/send.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ suspend fun send(post: Post) {
4848
text = post.content.forChat(chat),
4949
parseMode = MarkdownV2ParseMode,
5050
replyMarkup = votes?.toInlineKeyboardMarkup(),
51-
disableWebPagePreview = true,
51+
disableWebPagePreview = post.frontmatter.disableWebPagePreview,
5252
)
5353
}
5454
}

herald/src/main/kotlin/by/jprof/telegram/bot/herald/model/Frontmatter.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ data class Frontmatter(
77
val chats: List<Long>,
88
val image: String? = null,
99
val votes: List<String>? = null,
10+
val disableWebPagePreview: Boolean = true,
1011
)

0 commit comments

Comments
 (0)