fix webp as image type

This commit is contained in:
les
2020-06-14 20:58:23 +02:00
parent c9c6d1dc8f
commit 2593c1891f
3 changed files with 10 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ module.exports = (sequelize, DataTypes) => {
if (this.image_path) {
attachment.push({
type: 'Document',
mediaType: 'image/jpeg',
mediaType: 'image/webp',
url: `${config.baseurl}/media/${this.image_path}`,
name: null,
blurHash: null
@@ -66,8 +66,14 @@ module.exports = (sequelize, DataTypes) => {
return {
id: `${config.baseurl}/federation/m/${this.id}`,
name: this.title,
url: `${config.baseurl}/event/${this.id}`,
type: 'Event',
startTime: moment.unix(this.start_datetime).locale(locale).format(),
endTime: moment.unix(this.end_datetime).locale(locale).format(),
location: {
name: this.place.name
},
attachment,
tag: tags.map(tag => ({
type: 'Hashtag',
@@ -78,7 +84,6 @@ module.exports = (sequelize, DataTypes) => {
attributedTo: `${config.baseurl}/federation/u/${username}`,
to: follower || [],
cc: ['https://www.w3.org/ns/activitystreams#Public', `${config.baseurl}/federation/u/${username}/followers`],
name: this.title,
summary,
sensitive: false
}