mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55:12 +00:00
parent
c1e69e7a53
commit
83a67606a9
2 changed files with 12 additions and 7 deletions
|
@ -14,6 +14,7 @@ You should also include the user name that made the change.
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
- プッシュ通知でカスタム絵文字リアクションを表示できるように
|
- プッシュ通知でカスタム絵文字リアクションを表示できるように
|
||||||
|
- アンテナでCWも検索対象にするように
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- 外部メディアプロキシ使用時にアバタークロップができない問題を修正
|
- 外部メディアプロキシ使用時にアバタークロップができない問題を修正
|
||||||
|
|
|
@ -171,13 +171,15 @@ export class AntennaService implements OnApplicationShutdown {
|
||||||
.filter(xs => xs.length > 0);
|
.filter(xs => xs.length > 0);
|
||||||
|
|
||||||
if (keywords.length > 0) {
|
if (keywords.length > 0) {
|
||||||
if (note.text == null) return false;
|
if (note.text == null && note.cw == null) return false;
|
||||||
|
|
||||||
|
const _text = (note.text ?? '') + '\n' + (note.cw ?? '');
|
||||||
|
|
||||||
const matched = keywords.some(and =>
|
const matched = keywords.some(and =>
|
||||||
and.every(keyword =>
|
and.every(keyword =>
|
||||||
antenna.caseSensitive
|
antenna.caseSensitive
|
||||||
? note.text!.includes(keyword)
|
? _text.includes(keyword)
|
||||||
: note.text!.toLowerCase().includes(keyword.toLowerCase()),
|
: _text.toLowerCase().includes(keyword.toLowerCase()),
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!matched) return false;
|
if (!matched) return false;
|
||||||
|
@ -189,13 +191,15 @@ export class AntennaService implements OnApplicationShutdown {
|
||||||
.filter(xs => xs.length > 0);
|
.filter(xs => xs.length > 0);
|
||||||
|
|
||||||
if (excludeKeywords.length > 0) {
|
if (excludeKeywords.length > 0) {
|
||||||
if (note.text == null) return false;
|
if (note.text == null && note.cw == null) return false;
|
||||||
|
|
||||||
|
const _text = (note.text ?? '') + '\n' + (note.cw ?? '');
|
||||||
|
|
||||||
const matched = excludeKeywords.some(and =>
|
const matched = excludeKeywords.some(and =>
|
||||||
and.every(keyword =>
|
and.every(keyword =>
|
||||||
antenna.caseSensitive
|
antenna.caseSensitive
|
||||||
? note.text!.includes(keyword)
|
? _text.includes(keyword)
|
||||||
: note.text!.toLowerCase().includes(keyword.toLowerCase()),
|
: _text.toLowerCase().includes(keyword.toLowerCase()),
|
||||||
));
|
));
|
||||||
|
|
||||||
if (matched) return false;
|
if (matched) return false;
|
||||||
|
|
Loading…
Reference in a new issue