fix GNU Social / Pleroma compat
This commit is contained in:
parent
d12b39963b
commit
013bc02d23
|
@ -31,7 +31,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<div class="account-profile-note">
|
||||
{{{profile.note}}}
|
||||
{{{massagedNote}}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -187,7 +187,15 @@
|
|||
|
||||
export default {
|
||||
computed: {
|
||||
headerIsMissing: (profile) => profile.header.endsWith('missing.png')
|
||||
headerIsMissing: (profile) => profile.header.endsWith('missing.png'),
|
||||
note: (profile) => profile.note,
|
||||
massagedNote: (note) => {
|
||||
// GNU Social / Pleroma don't add <p> tags
|
||||
if (!note.startsWith('<p>')) {
|
||||
note = `<p>${note}</p>`
|
||||
}
|
||||
return note
|
||||
}
|
||||
},
|
||||
store: () => store,
|
||||
components: {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class="status-content {{isStatusInOwnThread ? 'status-in-own-thread' : ''}} {{isStatusInNotification ? 'status-in-notification' : ''}}"
|
||||
ref:node
|
||||
>
|
||||
{{{emojifiedContent}}}
|
||||
{{{massagedContent}}}
|
||||
</div>
|
||||
<style>
|
||||
.status-content {
|
||||
|
@ -66,8 +66,9 @@
|
|||
},
|
||||
store: () => store,
|
||||
computed: {
|
||||
emojifiedContent: (status, $autoplayGifs) => {
|
||||
massagedContent: (status, $autoplayGifs) => {
|
||||
let content = status.content
|
||||
// emojify
|
||||
if (status.emojis && status.emojis.length) {
|
||||
for (let emoji of status.emojis) {
|
||||
let { shortcode, url, static_url } = emoji
|
||||
|
@ -81,6 +82,10 @@
|
|||
)
|
||||
}
|
||||
}
|
||||
// GNU Social and Pleroma don't add <p> tags
|
||||
if (!content.startsWith('<p>')) {
|
||||
content = `<p>${content}</p>`
|
||||
}
|
||||
return content
|
||||
},
|
||||
statusId: (status) => status.id
|
||||
|
|
Loading…
Reference in a new issue