mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-10 17:08:07 -06:00
Review changes
This commit is contained in:
parent
dfb9d63123
commit
a116676814
28 changed files with 282 additions and 270 deletions
|
|
@ -165,19 +165,19 @@ func (d *deref) dereferenceAccountable(ctx context.Context, username string, rem
|
|||
}
|
||||
|
||||
switch t.GetTypeName() {
|
||||
case string(ap.ActorPerson):
|
||||
case ap.ActorPerson:
|
||||
p, ok := t.(vocab.ActivityStreamsPerson)
|
||||
if !ok {
|
||||
return nil, errors.New("DereferenceAccountable: error resolving type as activitystreams person")
|
||||
}
|
||||
return p, nil
|
||||
case string(ap.ActorApplication):
|
||||
case ap.ActorApplication:
|
||||
p, ok := t.(vocab.ActivityStreamsApplication)
|
||||
if !ok {
|
||||
return nil, errors.New("DereferenceAccountable: error resolving type as activitystreams application")
|
||||
}
|
||||
return p, nil
|
||||
case string(ap.ActorService):
|
||||
case ap.ActorService:
|
||||
p, ok := t.(vocab.ActivityStreamsService)
|
||||
if !ok {
|
||||
return nil, errors.New("DereferenceAccountable: error resolving type as activitystreams service")
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ func (f *federatingDB) Accept(ctx context.Context, accept vocab.ActivityStreamsA
|
|||
}
|
||||
switch iter.GetType().GetTypeName() {
|
||||
// we have the whole object so we can figure out what we're accepting
|
||||
case string(ap.ActivityFollow):
|
||||
case ap.ActivityFollow:
|
||||
// ACCEPT FOLLOW
|
||||
asFollow, ok := iter.GetType().(vocab.ActivityStreamsFollow)
|
||||
if !ok {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func (f *federatingDB) Undo(ctx context.Context, undo vocab.ActivityStreamsUndo)
|
|||
continue
|
||||
}
|
||||
switch iter.GetType().GetTypeName() {
|
||||
case string(ap.ActivityFollow):
|
||||
case ap.ActivityFollow:
|
||||
// UNDO FOLLOW
|
||||
ASFollow, ok := iter.GetType().(vocab.ActivityStreamsFollow)
|
||||
if !ok {
|
||||
|
|
@ -102,11 +102,11 @@ func (f *federatingDB) Undo(ctx context.Context, undo vocab.ActivityStreamsUndo)
|
|||
}
|
||||
l.Debug("follow undone")
|
||||
return nil
|
||||
case string(ap.ActivityLike):
|
||||
case ap.ActivityLike:
|
||||
// UNDO LIKE
|
||||
case string(ap.ActivityAnnounce):
|
||||
case ap.ActivityAnnounce:
|
||||
// UNDO BOOST/REBLOG/ANNOUNCE
|
||||
case string(ap.ActivityBlock):
|
||||
case ap.ActivityBlock:
|
||||
// UNDO BLOCK
|
||||
ASBlock, ok := iter.GetType().(vocab.ActivityStreamsBlock)
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue