Merge branch 'master' into 6665-filtermenu-mobile-bug

This commit is contained in:
Wolfgang Huß 2023-08-23 11:51:36 +02:00 committed by GitHub
commit d13aaebb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -334,9 +334,7 @@ export default {
;[...this.messages, ...Message].forEach((m) => { ;[...this.messages, ...Message].forEach((m) => {
if (m.senderId !== this.currentUser.id) m.seen = true if (m.senderId !== this.currentUser.id) m.seen = true
m.date = new Date(m.date).toDateString() m.date = new Date(m.date).toDateString()
if (!m.avatar?.startsWith('/api/')) { m.avatar = this.$filters.proxyApiUrl(m.avatar)
m.avatar = this.$filters.proxyApiUrl(m.avatar)
}
msgs[m.indexId] = m msgs[m.indexId] = m
}) })
this.messages = msgs.filter(Boolean) this.messages = msgs.filter(Boolean)

View File

@ -270,7 +270,7 @@ export default {
}, },
group: { group: {
linkTitle: '&' + e.features[0].properties.slug, linkTitle: '&' + e.features[0].properties.slug,
link: `/group/${e.features[0].properties.id}/${e.features[0].properties.slug}`, link: `/groups/${e.features[0].properties.id}/${e.features[0].properties.slug}`,
}, },
event: { event: {
linkTitle: e.features[0].properties.slug, linkTitle: e.features[0].properties.slug,

View File

@ -98,6 +98,7 @@ export default ({ app = {} }) => {
proxyApiUrl: (input) => { proxyApiUrl: (input) => {
const url = input && (input.url || input) const url = input && (input.url || input)
if (!url) return url if (!url) return url
if (url.startsWith('/api/')) return url
return url.startsWith('/') ? url.replace('/', '/api/') : url return url.startsWith('/') ? url.replace('/', '/api/') : url
}, },
}) })