diff options
author | 2021-05-21 23:04:59 +0200 | |
---|---|---|
committer | 2021-05-21 23:04:59 +0200 | |
commit | 0df2e18cc0d5440deca32681f33c66d883913901 (patch) | |
tree | d52cb72f376695c70c37377fdb03ae47177e420e /internal/typeutils | |
parent | Follows and relationships (#27) (diff) | |
download | gotosocial-0df2e18cc0d5440deca32681f33c66d883913901.tar.xz |
Home timeline (#28)
* v. basic implementation of home timeline
* Go fmt ./...
Diffstat (limited to 'internal/typeutils')
-rw-r--r-- | internal/typeutils/astointernal.go | 2 | ||||
-rw-r--r-- | internal/typeutils/internaltoas.go | 2 | ||||
-rw-r--r-- | internal/typeutils/internaltofrontend.go | 24 |
3 files changed, 14 insertions, 14 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index bf1ef7f45..7eb3f5927 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -121,7 +121,7 @@ func (c *converter) ASRepresentationToAccount(accountable Accountable) (*gtsmode acct.URL = url.String() // InboxURI - if accountable.GetActivityStreamsInbox() != nil || accountable.GetActivityStreamsInbox().GetIRI() != nil { + if accountable.GetActivityStreamsInbox() != nil && accountable.GetActivityStreamsInbox().GetIRI() != nil { acct.InboxURI = accountable.GetActivityStreamsInbox().GetIRI().String() } diff --git a/internal/typeutils/internaltoas.go b/internal/typeutils/internaltoas.go index 072c4e690..b7056ccbe 100644 --- a/internal/typeutils/internaltoas.go +++ b/internal/typeutils/internaltoas.go @@ -439,7 +439,7 @@ func (c *converter) StatusToAS(s *gtsmodel.Status) (vocab.ActivityStreamsNote, e // replies // TODO - + return status, nil } diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 70f8a8d3c..1fd1577f9 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -575,18 +575,18 @@ func (c *converter) InstanceToMasto(i *gtsmodel.Instance) (*model.Instance, erro func (c *converter) RelationshipToMasto(r *gtsmodel.Relationship) (*model.Relationship, error) { return &model.Relationship{ - ID: r.ID, - Following: r.Following, - ShowingReblogs: r.ShowingReblogs, - Notifying: r.Notifying, - FollowedBy: r.FollowedBy, - Blocking: r.Blocking, - BlockedBy: r.BlockedBy, - Muting: r.Muting, + ID: r.ID, + Following: r.Following, + ShowingReblogs: r.ShowingReblogs, + Notifying: r.Notifying, + FollowedBy: r.FollowedBy, + Blocking: r.Blocking, + BlockedBy: r.BlockedBy, + Muting: r.Muting, MutingNotifications: r.MutingNotifications, - Requested: r.Requested, - DomainBlocking: r.DomainBlocking, - Endorsed: r.Endorsed, - Note: r.Note, + Requested: r.Requested, + DomainBlocking: r.DomainBlocking, + Endorsed: r.Endorsed, + Note: r.Note, }, nil } |