summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltofrontend.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-05-21 15:48:26 +0200
committerLibravatar GitHub <noreply@github.com>2021-05-21 15:48:26 +0200
commitd839f27c306eedebdc7cc0311f35b8856cc2bb24 (patch)
tree7a11a3a641f902991d26771c4d3f8e836a2bce7e /internal/typeutils/internaltofrontend.go
parentupdate progress (diff)
downloadgotosocial-d839f27c306eedebdc7cc0311f35b8856cc2bb24.tar.xz
Follows and relationships (#27)
* Follows -- create and undo, both remote and local * Statuses -- federate new posts, including media, attachments, CWs and image descriptions.
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r--internal/typeutils/internaltofrontend.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index e4ccab988..70f8a8d3c 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -572,3 +572,21 @@ func (c *converter) InstanceToMasto(i *gtsmodel.Instance) (*model.Instance, erro
return mi, nil
}
+
+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,
+ MutingNotifications: r.MutingNotifications,
+ Requested: r.Requested,
+ DomainBlocking: r.DomainBlocking,
+ Endorsed: r.Endorsed,
+ Note: r.Note,
+ }, nil
+}