Threading improvments

This commit is contained in:
2022-12-28 22:09:39 +00:00
parent b26f3a9b95
commit 99410dd8c2
8 changed files with 89 additions and 59 deletions

View File

@ -149,30 +149,4 @@ export default class Event {
ev.PubKey = pubKey;
return ev;
}
/**
* Create new SetMetadata event
* @param {String} pubKey Pubkey of the creator of this event
* @param {any} obj Metadata content
* @returns {Event}
*/
static SetMetadata(pubKey, obj) {
let ev = Event.ForPubKey(pubKey);
ev.Kind = EventKind.SetMetadata;
ev.Content = JSON.stringify(obj);
return ev;
}
/**
* Create a new TextNote event
* @param {String} pubKey
* @param {String} message
* @returns
*/
static NewNote(pubKey, message) {
let ev = Event.ForPubKey(pubKey);
ev.Kind = EventKind.TextNote;
ev.Content = message;
return ev;
}
}