Fix video embed
All checks were successful
/ build (push) Successful in 1m11s

This commit is contained in:
Astra 2025-09-14 09:55:27 +01:00
parent 5ff08f5acc
commit acbdd41680

View file

@ -32,7 +32,7 @@ const (
serverAddr = "wss://jetstream2.us-west.bsky.network/subscribe" serverAddr = "wss://jetstream2.us-west.bsky.network/subscribe"
// serverAddr = "wss://stream.zio.blue/subscribe" // serverAddr = "wss://stream.zio.blue/subscribe"
postFormat = "%s\n—\n<a href=\"https://bsky.app/profile/%s/post/%s\">🦋 @%s</a>" postFormat = "%s\n—\n<a href=\"https://bsky.app/profile/%s/post/%s\">🦋 @%s</a>"
quotePostFormat = "<blockquote>%s</blockquote>\n<a href=\"https://deer.social/profile/%s/post/%s\">➡️ @%s</a>\n—\n<a href=\"https://bsky.app/profile/%s/post/%s\">🦋 @%s</a>" quotePostFormat = "<blockquote>%s</blockquote>\n<a href=\"https://bsky.app/profile/%s/post/%s\">➡️ @%s</a>\n—\n<a href=\"https://bsky.app/profile/%s/post/%s\">🦋 @%s</a>"
) )
type handler struct { type handler struct {
@ -302,7 +302,7 @@ func (h *handler) ProcessPost(event *models.Event) error {
if ps.IsQuotePost() { if ps.IsQuotePost() {
m.LinkPreviewOptions = tgbotapi.LinkPreviewOptions{ m.LinkPreviewOptions = tgbotapi.LinkPreviewOptions{
IsDisabled: false, IsDisabled: false,
URL: fmt.Sprintf("https://bsky.app/profile/%s/post/%s", URL: fmt.Sprintf("https://fxbsky.app/profile/%s/post/%s",
strings.Split(ps.Embed.Record.URI, "/")[2], strings.Split(ps.Embed.Record.URI, "/")[2],
strings.Split(ps.Embed.Record.URI, "/")[4]), strings.Split(ps.Embed.Record.URI, "/")[4]),
PreferSmallMedia: false, PreferSmallMedia: false,