f02150468b
We don't have any extensions listed or link this in the "endpoints" field on actors yet. The endpoint also doesn't currently provide a way to expose any additional metadata about an extension beyond its URL (in part because the SWICG proposal currently doesn't include that). We can add extensions to the endpoint's response by calling Mastodon::Extension::register with the extension URL.
18 lines
220 B
Ruby
18 lines
220 B
Ruby
class Mastodon::Extension
|
|
@@extensions = []
|
|
|
|
def self.register url
|
|
@extensions << Extension.new(url)
|
|
end
|
|
|
|
def self.all
|
|
@extensions
|
|
end
|
|
|
|
def initialize url
|
|
@url = url
|
|
end
|
|
|
|
attr_reader :url
|
|
end
|