Adding check for mastodon import ID
Peter Sanchez peter@netlandish.com
Tue, 26 Apr 2022 18:22:59 -0600
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
import.go
→
import.go
@@ -106,6 +106,9 @@ toot := item
if toot.Type != "Create" { continue } + if strings.HasSuffix(toot.Id, "/activity") { + toot.Id = strings.TrimSuffix(toot.Id, "/activity") + } tootid := re_tootid.FindString(toot.Id) xid := fmt.Sprintf("%s/%s/%s", user.URL, honkSep, tootid) if havetoot(xid) {