[COMPONENT][Posting] Blog posts should be Articles by default
This commit is contained in:
@@ -168,7 +168,7 @@ class Note extends Model
|
||||
'type' => match ($type_note->get('type')) {
|
||||
'Article' => 'article',
|
||||
'Page' => 'page',
|
||||
default => 'note'
|
||||
default => 'note' // graceful degradation
|
||||
},
|
||||
'source' => $source,
|
||||
];
|
||||
@@ -369,11 +369,12 @@ class Note extends Model
|
||||
}
|
||||
|
||||
$attr = [
|
||||
'@context' => ActivityPub::$activity_streams_two_context,
|
||||
'type' => $object->getScope() === VisibilityScope::MESSAGE ? 'ChatMessage' : (match ($object->getType()) {
|
||||
'note' => 'Note',
|
||||
'page' => 'Page',
|
||||
default => throw new Exception('Unsupported note type.')
|
||||
'@context' => ActivityPub::$activity_streams_two_context,
|
||||
'type' => $object->getScope() === VisibilityScope::MESSAGE ? 'ChatMessage' : (match ($object->getType()) {
|
||||
'note' => 'Note',
|
||||
'article' => 'Article',
|
||||
'page' => 'Page',
|
||||
default => throw new Exception('Unsupported note type.')
|
||||
}),
|
||||
'id' => $object->getUrl(),
|
||||
'url' => $object->getUrl(),
|
||||
|
Reference in New Issue
Block a user