mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 02:22:24 -05:00
Notifications (#34)
Notifications working for: * Mentions * Faves * New follow requests * New followers
This commit is contained in:
parent
e670c32a91
commit
40add68691
42 changed files with 2096 additions and 1194 deletions
|
|
@ -280,22 +280,4 @@ func (f *federator) GetTransportForUser(username string) (transport.Transport, e
|
|||
return transport, nil
|
||||
}
|
||||
|
||||
func sameActor(activityActor vocab.ActivityStreamsActorProperty, followActor vocab.ActivityStreamsActorProperty) bool {
|
||||
if activityActor == nil || followActor == 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 {
|
||||
return false
|
||||
}
|
||||
if fIter.GetIRI() == nil {
|
||||
return false
|
||||
}
|
||||
if aIter.GetIRI().String() == fIter.GetIRI().String() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue