Change quote post to use deer.social for embeds
All checks were successful
/ build (push) Successful in 1m58s

This commit is contained in:
Astra 2025-09-13 17:46:14 +01:00
parent dc7382f162
commit 5ff08f5acc

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://bsky.app/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://deer.social/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 {
@ -327,7 +327,7 @@ func (h *handler) ProcessPost(event *models.Event) error {
} }
func buildBlobURL(server string, did string, cid string) string { func buildBlobURL(server string, did string, cid string) string {
return server + "/xrpc/com.atproto.sync.getBlob?did=" + url.QueryEscape(did) + "&cid=" + url.QueryEscape(cid) return server + "/xrpc/com.atproto.sync.getBlob?did=" + url.QueryEscape(did) + "&cid=" + cid
} }
func getLink(event *models.Event) (string, string) { func getLink(event *models.Event) (string, string) {