Write notes

This commit is contained in:
2022-12-28 16:29:42 +00:00
parent d2a1b7f5ac
commit 0725e84d7b
2 changed files with 32 additions and 4 deletions

View File

@ -162,4 +162,17 @@ export default class Event {
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;
}
}