Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
syuilo committed Nov 17, 2022
2 parents d5aee2e + 456705a commit 521f97d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ You should also include the user name that made the change.
### Improvements

### Bugfixes
- Server: 引用内の文章がnyaizeされてしまう問題を修正 @kabo2468
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
- Client: インスタンスティッカーのfaviconを読み込む際に偽サイト警告が出ることがあるのを修正 @syuilo

Expand Down
14 changes: 11 additions & 3 deletions packages/backend/src/core/entities/NoteEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,20 @@ export class NoteEntityService implements OnModuleInit {

if (packed.user.isCat && packed.text) {
const tokens = packed.text ? mfm.parse(packed.text) : [];
mfm.inspect(tokens, node => {
function nyaizeNode(node: mfm.MfmNode) {
if (node.type === 'quote') return;
if (node.type === 'text') {
// TODO: quoteなtextはskip
node.props.text = nyaize(node.props.text);
}
});
if (node.children) {
for (const child of node.children) {
nyaizeNode(child);
}
}
}
for (const node of tokens) {
nyaizeNode(node);
}
packed.text = mfm.toString(tokens);
}

Expand Down

0 comments on commit 521f97d

Please sign in to comment.