mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
add address to AP location prop and check endTime
This commit is contained in:
parent
adcdbc790d
commit
82c21b3255
1 changed files with 5 additions and 3 deletions
|
@ -93,15 +93,17 @@ Event.prototype.toAP = function (username, locale, to = []) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: `${config.baseurl}/federation/m/${this.id}`,
|
id: `${config.baseurl}/federation/m/${this.id}`,
|
||||||
name: this.title,
|
name: this.title,
|
||||||
url: `${config.baseurl}/event/${this.slug || this.id}`,
|
url: `${config.baseurl}/event/${this.slug || this.id}`,
|
||||||
type: 'Event',
|
type: 'Event',
|
||||||
startTime: moment.unix(this.start_datetime).locale(locale).format(),
|
startTime: moment.unix(this.start_datetime).locale(locale).format(),
|
||||||
endTime: moment.unix(this.end_datetime).locale(locale).format(),
|
endTime: this.end_datetime ? moment.unix(this.end_datetime).locale(locale).format() : null,
|
||||||
location: {
|
location: {
|
||||||
name: this.place && this.place.name
|
name: this.place.name,
|
||||||
|
address: this.place.address
|
||||||
},
|
},
|
||||||
attachment,
|
attachment,
|
||||||
tag: tags && tags.map(tag => ({
|
tag: tags && tags.map(tag => ({
|
||||||
|
|
Loading…
Reference in a new issue