feed all follow events to socialGraphInstance.handleFollowEvent

This commit is contained in:
Martti Malmi 2023-11-17 12:02:08 +02:00
parent 4fbe92baa2
commit fea0e3c475
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import {
mapEventToProfile,
PowWorker,
encodeTLVEntries,
socialGraphInstance,
} from "@snort/system";
import { SnortContext } from "@snort/system-react";
import { removeUndefined, throwIfOffline } from "@snort/shared";
@ -109,6 +110,12 @@ System.on("auth", async (c, r, cb) => {
}
});
System.on("event", ev => {
if (ev.kind === 3) {
socialGraphInstance.handleFollowEvent(ev);
}
});
async function fetchProfile(key: string) {
try {
throwIfOffline();