Thread progess

This commit is contained in:
2022-12-20 12:08:41 +00:00
parent e617d6d528
commit c454f5c7aa
6 changed files with 98 additions and 12 deletions

View File

@ -2,10 +2,16 @@ import Event from "./Event";
export default class Thread {
constructor() {
/** @type {Tag} */
this.Root = null;
/** @type {Tag} */
this.ReplyTo = null;
/** @type {Array<Tag>} */
this.Mentions = [];
/** @type {Event} */
this.Reply = null;
/** @type {Array<String>} */
this.PubKeys = [];
}
/**
@ -34,6 +40,7 @@ export default class Thread {
ret.Root = root;
ret.ReplyTo = reply;
}
ret.PubKeys = ev.Tags.filter(a => a.Key === "p").map(a => a.PubKey);
return ret;
}