This commit is contained in:
parent
e041d00226
commit
70b30a9313
2 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
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 {
|
func (bluesky *Bluesky) GetPost(uri string) *Post {
|
||||||
|
|
|
||||||
3
main.go
3
main.go
|
|
@ -90,6 +90,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
tgpost, tgposterr := h.bsky.Bluesky.GetTelegramData(s[2])
|
tgpost, tgposterr := h.bsky.Bluesky.GetTelegramData(s[2])
|
||||||
|
|
||||||
if *delete {
|
if *delete {
|
||||||
if tgposterr == "" {
|
if tgposterr == "" {
|
||||||
log.Printf("Found post %s in channel %d, deleting", s[2], tgpost.ChannelID)
|
log.Printf("Found post %s in channel %d, deleting", s[2], tgpost.ChannelID)
|
||||||
|
|
@ -102,7 +103,7 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if tgpost.ChannelID != 0 {
|
if tgposterr == "" {
|
||||||
log.Printf("Post %s already sent to channel %d, exiting", s[2], tgpost.ChannelID)
|
log.Printf("Post %s already sent to channel %d, exiting", s[2], tgpost.ChannelID)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue