forked from AkkomaGang/akkoma-fe
Subject copying composition bug
This commit is contained in:
parent
6a867f6ae3
commit
e90e7ce2db
2 changed files with 6 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
||||||
"babel-plugin-lodash": "^3.2.11",
|
"babel-plugin-lodash": "^3.2.11",
|
||||||
"chromatism": "^3.0.0",
|
"chromatism": "^3.0.0",
|
||||||
"diff": "^3.0.1",
|
"diff": "^3.0.1",
|
||||||
|
"entities": "^1.1.2",
|
||||||
"karma-mocha-reporter": "^2.2.1",
|
"karma-mocha-reporter": "^2.2.1",
|
||||||
"localforage": "^1.5.0",
|
"localforage": "^1.5.0",
|
||||||
"node-sass": "^3.10.1",
|
"node-sass": "^3.10.1",
|
||||||
|
|
|
@ -12,6 +12,7 @@ import fileType from 'src/services/file_type/file_type.service'
|
||||||
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import { mentionMatchesUrl } from 'src/services/mention_matcher/mention_matcher.js'
|
import { mentionMatchesUrl } from 'src/services/mention_matcher/mention_matcher.js'
|
||||||
import { filter, find } from 'lodash'
|
import { filter, find } from 'lodash'
|
||||||
|
import entities from 'entities'
|
||||||
|
|
||||||
const Status = {
|
const Status = {
|
||||||
name: 'Status',
|
name: 'Status',
|
||||||
|
@ -201,14 +202,15 @@ const Status = {
|
||||||
},
|
},
|
||||||
replySubject () {
|
replySubject () {
|
||||||
if (!this.status.summary) return ''
|
if (!this.status.summary) return ''
|
||||||
|
const decodedSummary = entities.decodeHTML(this.status.summary)
|
||||||
const behavior = typeof this.$store.state.config.subjectLineBehavior === 'undefined'
|
const behavior = typeof this.$store.state.config.subjectLineBehavior === 'undefined'
|
||||||
? this.$store.state.instance.subjectLineBehavior
|
? this.$store.state.instance.subjectLineBehavior
|
||||||
: this.$store.state.config.subjectLineBehavior
|
: this.$store.state.config.subjectLineBehavior
|
||||||
const startsWithRe = this.status.summary.match(/^re[: ]/i)
|
const startsWithRe = decodedSummary.match(/^re[: ]/i)
|
||||||
if (behavior !== 'noop' && startsWithRe || behavior === 'masto') {
|
if (behavior !== 'noop' && startsWithRe || behavior === 'masto') {
|
||||||
return this.status.summary
|
return decodedSummary
|
||||||
} else if (behavior === 'email') {
|
} else if (behavior === 'email') {
|
||||||
return 're: '.concat(this.status.summary)
|
return 're: '.concat(decodedSummary)
|
||||||
} else if (behavior === 'noop') {
|
} else if (behavior === 'noop') {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue