summaryrefslogtreecommitdiff
path: root/internal/typeutils/frontendtointernal.go
diff options
context:
space:
mode:
authorLibravatar Vyr Cossont <VyrCossont@users.noreply.github.com>2023-07-29 03:49:14 -0700
committerLibravatar GitHub <noreply@github.com>2023-07-29 12:49:14 +0200
commitb874e9251e00961f295e4c409e1b34da89fab4ed (patch)
treecb528816250f322707a90c0954c963886ea96c19 /internal/typeutils/frontendtointernal.go
parent[chore] Update activity dependency (#2031) (diff)
downloadgotosocial-b874e9251e00961f295e4c409e1b34da89fab4ed.tar.xz
[feature] Implement markers API (#1989)
* Implement markers API Fixes #1856 * Correct import grouping in markers files * Regenerate Swagger for markers API * Shorten names for readability * Cache markers for 6 hours * Update DB ref * Update envparsing.sh
Diffstat (limited to 'internal/typeutils/frontendtointernal.go')
-rw-r--r--internal/typeutils/frontendtointernal.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/typeutils/frontendtointernal.go b/internal/typeutils/frontendtointernal.go
index d57f36995..3bb0933f3 100644
--- a/internal/typeutils/frontendtointernal.go
+++ b/internal/typeutils/frontendtointernal.go
@@ -37,3 +37,13 @@ func APIVisToVis(m apimodel.Visibility) gtsmodel.Visibility {
}
return ""
}
+
+func APIMarkerNameToMarkerName(m apimodel.MarkerName) gtsmodel.MarkerName {
+ switch m {
+ case apimodel.MarkerNameHome:
+ return gtsmodel.MarkerNameHome
+ case apimodel.MarkerNameNotifications:
+ return gtsmodel.MarkerNameNotifications
+ }
+ return ""
+}