update event types for federation
This commit is contained in:
parent
20f1a39781
commit
a5dcc8264d
|
@ -435,6 +435,7 @@ export class ApRendererService {
|
||||||
name: event.title,
|
name: event.title,
|
||||||
startTime: event.start,
|
startTime: event.start,
|
||||||
endTime: event.end,
|
endTime: event.end,
|
||||||
|
...event.metadata,
|
||||||
} as const : {};
|
} as const : {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ export class ApEventService {
|
||||||
start,
|
start,
|
||||||
end,
|
end,
|
||||||
metadata: {
|
metadata: {
|
||||||
'@context': 'https://schema.org',
|
|
||||||
'@type': 'Event',
|
'@type': 'Event',
|
||||||
name: note.name,
|
name: note.name,
|
||||||
url: note.href,
|
url: note.href,
|
||||||
|
|
|
@ -75,7 +75,6 @@ export class Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EventSchema = {
|
export type EventSchema = {
|
||||||
'@context': 'https://schema.org';
|
|
||||||
'@type': 'Event';
|
'@type': 'Event';
|
||||||
name?: string;
|
name?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
|
|
|
@ -32,7 +32,6 @@ export const Default = {
|
||||||
start: '2017-10-25T15:00:00+0900',
|
start: '2017-10-25T15:00:00+0900',
|
||||||
end: '2017-10-25T18:00:00+0900',
|
end: '2017-10-25T18:00:00+0900',
|
||||||
metadata: {
|
metadata: {
|
||||||
'@context': 'https://schema.org',
|
|
||||||
'@type': 'Event',
|
'@type': 'Event',
|
||||||
location: 'Kawasaki, Japan',
|
location: 'Kawasaki, Japan',
|
||||||
description: 'Let\'s have a tea party!',
|
description: 'Let\'s have a tea party!',
|
||||||
|
|
|
@ -163,7 +163,6 @@ function get(): misskey.entities.Note['event'] {
|
||||||
start: start,
|
start: start,
|
||||||
end: end,
|
end: end,
|
||||||
metadata: {
|
metadata: {
|
||||||
'@context': 'https://schema.org',
|
|
||||||
'@type': 'Event',
|
'@type': 'Event',
|
||||||
name: title.value,
|
name: title.value,
|
||||||
startDate: (new Date(start)).toISOString(),
|
startDate: (new Date(start)).toISOString(),
|
||||||
|
|
Loading…
Reference in New Issue