Don't post if starting with @
All checks were successful
/ build (push) Successful in 1m40s

This commit is contained in:
Astra 2025-11-03 10:17:18 +00:00
parent 1d2347ab72
commit e89137224b

10
main.go
View file

@ -195,8 +195,9 @@ func (h *handler) ProcessPost(event *models.Event) error {
now := time.Now()
createdAt := ps.CreatedAt
duration := now.Sub(createdAt)
if duration.Hours() > *oldPosts {
// don't post old posts
if duration.Hours() > *oldPosts ||
strings.HasPrefix(ps.Text, "@") ||
ps.IsReply() {
return nil
}
@ -205,11 +206,6 @@ func (h *handler) ProcessPost(event *models.Event) error {
isEditedPost = true
}
if ps.IsReply() { //|| ps.IsQuotePost() {
// don't want to post replies to channel
return nil
}
var captionText string
if ps.IsQuotePost() {
if ps.Embed.Record.Type == "app.bsky.embed.record" {