Compare commits
No commits in common. "c38902c97652c28a0973cd14661e4286b6df8b09" and "dc9531322abf215a4b1a656ea819b4eff0fcaaa9" have entirely different histories.
c38902c976
...
dc9531322a
3 changed files with 6 additions and 11 deletions
|
@ -79,7 +79,7 @@ fn check_word_mute_impl(
|
|||
let text_lower = text.to_lowercase();
|
||||
muted_word_list
|
||||
.iter()
|
||||
.all(|muted_word| text_lower.contains(&muted_word.to_lowercase()))
|
||||
.all(|muted_word| text_lower.contains(muted_word))
|
||||
})
|
||||
}) || muted_patterns.iter().any(|muted_pattern| {
|
||||
Regex::new(convert_regex(muted_pattern).as_str())
|
||||
|
|
|
@ -7,7 +7,6 @@ import { generateMutedUserQuery } from "@/server/api/common/generate-muted-user-
|
|||
import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js";
|
||||
import { generateBlockedUserQuery } from "@/server/api/common/generate-block-query.js";
|
||||
import { generateMutedNoteThreadQuery } from "@/server/api/common/generate-muted-note-thread-query.js";
|
||||
import { generateMutedNoteQuery } from "@/server/api/common/generate-muted-note-query.js";
|
||||
|
||||
export const meta = {
|
||||
tags: ["notes"],
|
||||
|
@ -70,7 +69,6 @@ export default define(meta, paramDef, async (ps, user) => {
|
|||
|
||||
generateVisibilityQuery(query, user);
|
||||
generateMutedUserQuery(query, user);
|
||||
generateMutedNoteQuery(query, user);
|
||||
generateMutedNoteThreadQuery(query, user);
|
||||
generateBlockedUserQuery(query, user);
|
||||
|
||||
|
|
|
@ -887,17 +887,14 @@ async function createMentionedEvents(
|
|||
nm: NotificationManager,
|
||||
) {
|
||||
for (const u of mentionedUsers.filter((u) => Users.isLocalUser(u))) {
|
||||
const isWordMuted = await MutedNotes.existsBy({
|
||||
const threadMuted = await NoteThreadMutings.findOneBy({
|
||||
userId: u.id,
|
||||
noteId: note.id,
|
||||
threadId: note.threadId || note.id,
|
||||
});
|
||||
if (isWordMuted) continue;
|
||||
|
||||
const isThreadMuted = await NoteThreadMutings.existsBy({
|
||||
userId: u.id,
|
||||
threadId: note.threadId ?? note.id,
|
||||
});
|
||||
if (isThreadMuted) continue;
|
||||
if (threadMuted) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// note with "specified" visibility might not be visible to mentioned users
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue