FIX: Automatically adds the original post's author to the list of

recipients when composing a reply.

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
pull/793/head
Cyrille Bollu 2019-10-11 14:38:03 +02:00 zatwierdzone przez Robin Appelman
rodzic 9edfc83a8f
commit b352892a3f
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -610,6 +610,7 @@ export default {
mounted() {
this.$root.$on('composer-reply', (data) => {
this.replyTo = data
this.type = 'direct'
})
},
methods: {
@ -737,7 +738,7 @@ export default {
let contentHtml = element.innerHTML
// Extract mentions from content and create an array ot of them
// Extract mentions from content and create an array out of them
let to = []
const mentionRegex = /<span class="mention"[^>]+><a[^>]+><img[^>]+>@([\w-_.]+@[\w-.]+)/g
let match = null
@ -748,6 +749,11 @@ export default {
}
} while (match)
// Add author of original post in case of reply
if (this.replyTo !== null) {
to.push(this.replyTo.actor_info.account)
}
// Extract hashtags from content and create an array ot of them
const hashtagRegex = />#([^<]+)</g
let hashtags = []