mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Support only federating Notes
When setting `notes_only = true` in the `[app]` configuration section, WF will only send out `Note` objects. Otherwise, it will send out both `Note`s and `Article`s.
This commit is contained in:
parent
8be71481c8
commit
f821ead3a1
2 changed files with 2 additions and 1 deletions
|
@ -140,6 +140,7 @@ type (
|
|||
// Federation
|
||||
Federation bool `ini:"federation"`
|
||||
PublicStats bool `ini:"public_stats"`
|
||||
NotesOnly bool `ini:"notes_only"`
|
||||
|
||||
// Access
|
||||
Private bool `ini:"private"`
|
||||
|
|
2
posts.go
2
posts.go
|
@ -1133,7 +1133,7 @@ func (p *PublicPost) CanonicalURL(hostName string) string {
|
|||
func (p *PublicPost) ActivityObject(app *App) *activitystreams.Object {
|
||||
cfg := app.cfg
|
||||
var o *activitystreams.Object
|
||||
if strings.Index(p.Content, "\n\n") == -1 {
|
||||
if cfg.App.NotesOnly || strings.Index(p.Content, "\n\n") == -1 {
|
||||
o = activitystreams.NewNoteObject()
|
||||
} else {
|
||||
o = activitystreams.NewArticleObject()
|
||||
|
|
Loading…
Reference in a new issue