Adding check for mastodon import ID

This commit is contained in:
Peter Sanchez 2022-04-26 18:22:59 -06:00
parent c468a048e1
commit 8179fb0ece
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ func importMastodon(username, source string) {
if toot.Type != "Create" { if toot.Type != "Create" {
continue continue
} }
if strings.HasSuffix(toot.Id, "/activity") {
toot.Id = strings.TrimSuffix(toot.Id, "/activity")
}
tootid := re_tootid.FindString(toot.Id) tootid := re_tootid.FindString(toot.Id)
xid := fmt.Sprintf("%s/%s/%s", user.URL, honkSep, tootid) xid := fmt.Sprintf("%s/%s/%s", user.URL, honkSep, tootid)
if havetoot(xid) { if havetoot(xid) {