From 70b30a9313655b52e7e55de5a09b86b5fc049dcf Mon Sep 17 00:00:00 2001 From: Astra Date: Wed, 29 Oct 2025 23:12:45 +0000 Subject: [PATCH] Fix post command --- bsky/bluesky.go | 2 +- main.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bsky/bluesky.go b/bsky/bluesky.go index d369a0f..33aa06a 100644 --- a/bsky/bluesky.go +++ b/bsky/bluesky.go @@ -195,7 +195,7 @@ func (bluesky *Bluesky) GetTelegramData(rkey string) (*TelegramRecord, string) { } bluesky.sling.New().Get("/xrpc/com.atproto.repo.getRecord").QueryStruct(¶ms).Receive(resp, resp) - return resp.Value, resp.Message + return resp.Value, resp.Error } func (bluesky *Bluesky) GetPost(uri string) *Post { diff --git a/main.go b/main.go index 87d00df..fdc3019 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,7 @@ func main() { } tgpost, tgposterr := h.bsky.Bluesky.GetTelegramData(s[2]) + if *delete { if tgposterr == "" { log.Printf("Found post %s in channel %d, deleting", s[2], tgpost.ChannelID) @@ -102,7 +103,7 @@ func main() { return } - if tgpost.ChannelID != 0 { + if tgposterr == "" { log.Printf("Post %s already sent to channel %d, exiting", s[2], tgpost.ChannelID) return }