Skip to content

Commit

Permalink
Add oEmbed URLs to User profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
benpate committed Nov 9, 2024
1 parent 84be404 commit b08e820
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/builder_outbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@ func (w Outbox) Data(path string) any {
return w._user.Data[path]
}

// OEmbedJSON returns the URL for the oEmbed JSON endpoint for this stream
func (w Outbox) OEmbedJSON() string {
return w.Host() + "/.oembed?url=" + w.Permalink() + "&format=json"
}

// OEmbedXML returns the URL for the oEmbed XML endpoint for this stream
func (w Outbox) OEmbedXML() string {
return w.Host() + "/.oembed?url=" + w.Permalink() + "&format=xml"
}

func (w Outbox) ActivityPubURL() string {
return w._user.ActivityPubURL()
}
Expand Down

0 comments on commit b08e820

Please sign in to comment.