aboutsummaryrefslogtreecommitdiff
path: root/views/profile.go
diff options
context:
space:
mode:
Diffstat (limited to 'views/profile.go')
-rw-r--r--views/profile.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/views/profile.go b/views/profile.go
new file mode 100644
index 0000000..12aae54
--- /dev/null
+++ b/views/profile.go
@@ -0,0 +1,21 @@
+package views
+
+import (
+ "git.capotej.com/capotej/communique/urls"
+ "github.com/go-fed/activity/streams"
+)
+
+func RenderProfile(name, domain string) (map[string]interface{}, error) {
+ u, err := urls.UrlInbox(name, domain)
+ if err != nil {
+ return nil, err
+ }
+
+ inb := streams.NewActivityStreamsInboxProperty()
+ inb.SetIRI(u)
+
+ p := streams.NewActivityStreamsService()
+ p.SetActivityStreamsInbox(inb)
+
+ return streams.Serialize(p)
+}