refactor: rename isTextRepost
to tagFilterOfTextRepost
This commit is contained in:
@ -6,12 +6,12 @@ import type { NotificationRequest } from "State/Login";
|
||||
import { MetadataCache, UsersDb } from "State/Users";
|
||||
import { getDisplayName } from "Element/ProfileImage";
|
||||
import { MentionRegex } from "Const";
|
||||
import { isTextRepost } from "Util";
|
||||
import { tagFilterOfTextRepost } from "Util";
|
||||
|
||||
export async function makeNotification(db: UsersDb, ev: TaggedRawEvent): Promise<NotificationRequest | null> {
|
||||
switch (ev.kind) {
|
||||
case EventKind.TextNote: {
|
||||
if (ev.tags.some(isTextRepost(ev))) {
|
||||
if (ev.tags.some(tagFilterOfTextRepost(ev))) {
|
||||
return null;
|
||||
}
|
||||
const pubkeys = new Set([ev.pubkey, ...ev.tags.filter(a => a[0] === "p").map(a => a[1])]);
|
||||
|
Reference in New Issue
Block a user