summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/federation/federatingdb/util.go')
-rw-r--r--internal/federation/federatingdb/util.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/internal/federation/federatingdb/util.go b/internal/federation/federatingdb/util.go
index 8ad209f5e..5137145f2 100644
--- a/internal/federation/federatingdb/util.go
+++ b/internal/federation/federatingdb/util.go
@@ -36,23 +36,27 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/uris"
)
-func sameActor(activityActor vocab.ActivityStreamsActorProperty, followActor vocab.ActivityStreamsActorProperty) bool {
- if activityActor == nil || followActor == nil {
+func sameActor(actor1 vocab.ActivityStreamsActorProperty, actor2 vocab.ActivityStreamsActorProperty) bool {
+ if actor1 == nil || actor2 == nil {
return false
}
- for aIter := activityActor.Begin(); aIter != activityActor.End(); aIter = aIter.Next() {
- for fIter := followActor.Begin(); fIter != followActor.End(); fIter = fIter.Next() {
- if aIter.GetIRI() == nil {
+
+ for a1Iter := actor1.Begin(); a1Iter != actor1.End(); a1Iter = a1Iter.Next() {
+ for a2Iter := actor2.Begin(); a2Iter != actor2.End(); a2Iter = a2Iter.Next() {
+ if a1Iter.GetIRI() == nil {
return false
}
- if fIter.GetIRI() == nil {
+
+ if a2Iter.GetIRI() == nil {
return false
}
- if aIter.GetIRI().String() == fIter.GetIRI().String() {
+
+ if a1Iter.GetIRI().String() == a2Iter.GetIRI().String() {
return true
}
}
}
+
return false
}