[chore] add some more slice related utility functions + remove duplicated functions (#3149)

This commit is contained in:
kim 2024-07-30 09:29:32 +00:00 committed by GitHub
commit 47c26818d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 216 additions and 43 deletions

View file

@ -162,7 +162,9 @@ func (f *Federator) PostInboxRequestBodyHook(ctx context.Context, r *http.Reques
// OtherIRIs will likely contain some
// duplicate entries now, so remove them.
otherIRIs = util.UniqueURIs(otherIRIs)
otherIRIs = util.DeduplicateFunc(otherIRIs,
(*url.URL).String, // serialized URL is 'key()'
)
// Finished, set other IRIs on the context
// so they can be checked for blocks later.