1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-03 01:09:01 +09:00
This commit is contained in:
syuilo 2018-12-02 07:02:08 +09:00
parent c58027e521
commit 864b6ad1bd
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
8 changed files with 12 additions and 10 deletions

View File

@ -39,7 +39,7 @@
</header>
<div class="body">
<p v-if="appearNote.cw != null" class="cw">
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
<misskey-flavored-markdown v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="appearNote.cw == null || showContent">

View File

@ -5,7 +5,7 @@
<mk-note-header class="header" :note="note" :mini="true"/>
<div class="body">
<p v-if="note.cw != null" class="cw">
<span class="text" v-if="note.cw != ''">{{ note.cw }}</span>
<misskey-flavored-markdown v-if="note.cw != ''" class="text" :text="note.cw" :author="note.user" :i="$store.state.i" :custom-emojis="note.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="note.cw == null || showContent">

View File

@ -5,7 +5,7 @@
<mk-note-header class="header" :note="note"/>
<div class="body">
<p v-if="note.cw != null" class="cw">
<span class="text" v-if="note.cw != ''">{{ note.cw }}</span>
<misskey-flavored-markdown v-if="note.cw != ''" class="text" :text="note.cw" :author="note.user" :i="$store.state.i" :custom-emojis="note.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="note.cw == null || showContent">

View File

@ -20,7 +20,7 @@
<mk-note-header class="header" :note="appearNote" :mini="mini"/>
<div class="body" v-if="appearNote.deletedAt == null">
<p v-if="appearNote.cw != null" class="cw">
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
<misskey-flavored-markdown v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="appearNote.cw == null || showContent">

View File

@ -26,7 +26,7 @@
</header>
<div class="body">
<p v-if="appearNote.cw != null" class="cw">
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
<misskey-flavored-markdown v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="appearNote.cw == null || showContent">

View File

@ -5,7 +5,7 @@
<mk-note-header class="header" :note="note" :mini="true"/>
<div class="body">
<p v-if="note.cw != null" class="cw">
<span class="text" v-if="note.cw != ''">{{ note.cw }}</span>
<misskey-flavored-markdown v-if="note.cw != ''" class="text" :text="note.cw" :author="note.user" :i="$store.state.i" :custom-emojis="note.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="note.cw == null || showContent">

View File

@ -16,7 +16,7 @@
<mk-note-header class="header" :note="appearNote" :mini="true"/>
<div class="body" v-if="appearNote.deletedAt == null">
<p v-if="appearNote.cw != null" class="cw">
<span class="text" v-if="appearNote.cw != ''">{{ appearNote.cw }}</span>
<misskey-flavored-markdown v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$store.state.i" :custom-emojis="appearNote.emojis" />
<mk-cw-button v-model="showContent"/>
</p>
<div class="content" v-show="appearNote.cw == null || showContent">

View File

@ -155,12 +155,14 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
// Parse MFM
const tokens = data.text ? parse(data.text) : [];
const cwTokens = data.cw ? parse(data.cw) : [];
const combinedTokens = tokens.concat(cwTokens);
const tags = extractHashtags(tokens);
const tags = extractHashtags(combinedTokens);
const emojis = extractEmojis(tokens);
const emojis = extractEmojis(combinedTokens);
const mentionedUsers = data.apMentions || await extractMentionedUsers(user, tokens);
const mentionedUsers = data.apMentions || await extractMentionedUsers(user, combinedTokens);
if (data.reply && !user._id.equals(data.reply.userId) && !mentionedUsers.some(u => u._id.equals(data.reply.userId))) {
mentionedUsers.push(await User.findOne({ _id: data.reply.userId }));