diff --git a/apps/wiki.json b/apps/wiki.json index 738cc48b..7386955d 100644 --- a/apps/wiki.json +++ b/apps/wiki.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "📝", - "previous": "&S0BU5A5u3ltu0+QZn+wANrO/sx+nqi4vQLs2t5Rwm/I=.sha256" + "previous": "&4lapemQFDuH+5ZeI831O8Qk+nK+47xLdHvKU6x53j2A=.sha256" } \ No newline at end of file diff --git a/apps/wiki/tf-wiki-doc.js b/apps/wiki/tf-wiki-doc.js index 9c43175d..bcff39c6 100644 --- a/apps/wiki/tf-wiki-doc.js +++ b/apps/wiki/tf-wiki-doc.js @@ -117,6 +117,22 @@ class TfWikiDocElement extends LitElement { return this.append_message(false); } + async on_blog_publish() { + let blob = this.blob; + let id = await tfrpc.rpc.store_blob(blob); + let message = { + type: 'blog', + key: this.value.id, + parent: this.value.parent, + summary: this.summary(blob), + thumbnail: this.thumbnail(blob), + blog: id, + mentions: this.blob.match(/(&.{44}.sha256)/g)?.map(x => ({link: x})), + }; + await tfrpc.rpc.appendMessage(this.whoami, message); + this.is_editing = false; + } + convert_to_format(buffer, type, mime_type) { return new Promise(function(resolve, reject) { let img = new Image(); @@ -202,6 +218,7 @@ class TfWikiDocElement extends LitElement { +
🔒 document is private