diff --git a/activitystreams/activity.go b/activitystreams/activity.go index 8cdf809..bdcf50e 100644 --- a/activitystreams/activity.go +++ b/activitystreams/activity.go @@ -142,7 +142,7 @@ type Object struct { Endpoints *Endpoints `json:"endpoints,omitempty"` // Extensions - // NOTE: add extensions here + Monetization string `json:"monetization,omitempty"` } // NewNoteObject creates a basic Note object that includes the public @@ -182,3 +182,8 @@ func NewPersonObject() *Object { } return &o } + +func (o *Object) AddWebMonetization(wallet string) { + o.Context = append(o.Context, apMonetizationContext) + o.Monetization = wallet +}