feat: add user screen
This commit is contained in:
@@ -99,6 +99,23 @@ export class Ark {
|
||||
}
|
||||
}
|
||||
|
||||
public async get_events_from(id: string, limit: number, asOf?: number) {
|
||||
try {
|
||||
let until: string = undefined;
|
||||
if (asOf && asOf > 0) until = asOf.toString();
|
||||
|
||||
const nostrEvents: Event[] = await invoke("get_events_from", {
|
||||
id,
|
||||
limit,
|
||||
until,
|
||||
});
|
||||
|
||||
return nostrEvents.sort((a, b) => b.created_at - a.created_at);
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
public async get_events(
|
||||
type: "local" | "global",
|
||||
limit: number,
|
||||
|
||||
Reference in New Issue
Block a user