diff options
| author | Henry Jameson <me@hjkos.com> | 2021-06-22 20:45:44 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-06-22 20:45:44 +0300 |
| commit | dd3fe61cf3cfcb1b41d1d34aa23ba99325d9dd56 (patch) | |
| tree | 1a2ab435107f473afb4924dec8ee95b1e86739e4 /src/components/status_body | |
| parent | a2f21f4e131e03240699017ef92b7dba38c4fb44 (diff) | |
| parent | a258182522e85c31fe9dfbfbddf7a314ca36d0ca (diff) | |
Merge branch 'better-still-emoji' into proper-attachments
* better-still-emoji:
fix non-notifying mentions and original mention display
fix not escaping some stuff
fix rich images
Diffstat (limited to 'src/components/status_body')
| -rw-r--r-- | src/components/status_body/status_body.js | 14 | ||||
| -rw-r--r-- | src/components/status_body/status_body.vue | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index 94366c6c..7ee965d9 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -86,6 +86,20 @@ const StatusContent = { }) }, methods: { + onParseReady (event) { + this.$emit('parseReady', event) + const { writtenMentions } = event + writtenMentions + .filter(mention => !mention.notifying) + .forEach(mention => { + const { content, url } = mention + const cleanedString = content.replace(/<[^>]+?>/gi, '') // remove all tags + if (!cleanedString.startsWith('@')) return + const handle = cleanedString.slice(1) + const host = url.replace(/^https?:\/\//, '').replace(/\/.+?$/, '') + this.$store.dispatch('fetchUserIfMissing', `${handle}@${host}`) + }) + }, toggleShowMore () { if (this.mightHideBecauseTall) { this.showingTall = !this.showingTall diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index 3eb13ce2..91ab1797 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -50,7 +50,8 @@ :handle-links="true" :hide-mentions="hideMentions" :greentext="mergedConfig.greentext" - @parseReady="$emit('parseReady', $event)" + :attentions="status.attentions" + @parseReady="onParseReady" /> <button |
