feat: NIP-24
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import Nostrich from "public/logo_256.png";
|
||||
|
||||
import { TaggedRawEvent, EventKind, MetadataCache } from "@snort/system";
|
||||
import { TaggedNostrEvent, EventKind, MetadataCache } from "@snort/system";
|
||||
import { getDisplayName } from "Element/ProfileImage";
|
||||
import { MentionRegex } from "Const";
|
||||
import { tagFilterOfTextRepost, unwrap } from "SnortUtils";
|
||||
@ -14,7 +14,7 @@ export interface NotificationRequest {
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export async function makeNotification(ev: TaggedRawEvent): Promise<NotificationRequest | null> {
|
||||
export async function makeNotification(ev: TaggedNostrEvent): Promise<NotificationRequest | null> {
|
||||
switch (ev.kind) {
|
||||
case EventKind.TextNote: {
|
||||
if (ev.tags.some(tagFilterOfTextRepost(ev))) {
|
||||
@ -40,7 +40,7 @@ export async function makeNotification(ev: TaggedRawEvent): Promise<Notification
|
||||
return null;
|
||||
}
|
||||
|
||||
function replaceTagsWithUser(ev: TaggedRawEvent, users: MetadataCache[]) {
|
||||
function replaceTagsWithUser(ev: TaggedNostrEvent, users: MetadataCache[]) {
|
||||
return ev.content
|
||||
.split(MentionRegex)
|
||||
.map(match => {
|
||||
|
Reference in New Issue
Block a user