Change how key for mentions stored
parent
6c48c016cc
commit
ea0400ab9d
|
@ -161,7 +161,7 @@ func saveWebmention(mention *Mention) (err error) {
|
|||
if err != nil {
|
||||
return errors.New("failed to marshal json before committing")
|
||||
}
|
||||
filePath := fmt.Sprintf("data/mentions/%x/%x.json", md5.Sum([]byte(mention.Target)), md5.Sum([]byte(mention.Source)))
|
||||
filePath := fmt.Sprintf("data/mentions/%x/%x.json", md5.Sum([]byte(strings.ReplaceAll(mention.Target, "/", ""))), md5.Sum([]byte(mention.Source)))
|
||||
err = UpdateFile(filePath, string(bytesRepresentation), "New webmention from "+mention.Source)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue