[mega] settings, timezone

This commit is contained in:
les
2019-10-20 14:22:55 +02:00
parent 4a03d60667
commit 66aa6a8692
24 changed files with 214 additions and 85 deletions

View File

@@ -37,11 +37,14 @@ module.exports = (sequelize, DataTypes) => {
}
event.prototype.toAP = function (username, follower = []) {
const tags = this.tags && this.tags.map(t => `<a href='/tags/${t.tag}' class='mention hashtag' rel='tag'>#${t.tag}</a>`).join(' ')
const tags = this.tags && this.tags.map(t => {
const tag = t.tag.replace(/[ #]/g, '_')
return `<a href='/tags/${t.tag}' class='mention hashtag status-link' rel='tag'><span>#${t.tag}</span></a>`
}).join(' ')
const content = `<a href='${config.baseurl}/event/${this.id}'>${this.title}</a><br/>
📍${this.place.name}<br/>
${moment.unix(this.start_datetime).utc(false).format('dddd, D MMMM (HH:mm)')}<br/><br/>
${moment.unix(this.start_datetime).format('dddd, D MMMM (HH:mm)')}<br/><br/>
${this.description.length > 200 ? this.description.substr(0, 200) + '...' : this.description}<br/>
${tags} <br/>`