This commit is contained in:
syuilo
2018-12-19 11:16:29 +09:00
parent 556677be7a
commit 00f979f0e6
5 changed files with 34 additions and 16 deletions

View File

@ -66,6 +66,7 @@ import { host } from '../../../config';
import { erase, unique } from '../../../../../prelude/array';
import { length } from 'stringz';
import { toASCII } from 'punycode';
import extractMentions from '../../../../../misc/extract-mentions';
export default Vue.extend({
i18n: i18n('mobile/views/components/post-form.vue'),
@ -174,7 +175,7 @@ export default Vue.extend({
if (this.reply && this.reply.text != null) {
const ast = parse(this.reply.text);
for (const x of ast.filter(t => t.type == 'mention')) {
for (const x of extractMentions(ast)) {
const mention = x.host ? `@${x.username}@${toASCII(x.host)}` : `@${x.username}`;
// 自分は除外