From a59fb4fd1efbdc2f55124ecf9dba48aac9f1f783 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Mon, 25 Jun 2018 14:33:14 +0200 Subject: [PATCH] Send file updated event to site on signing --- plugins/Sidebar/media/Sidebar.coffee | 6 +++--- plugins/Sidebar/media/all.js | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/Sidebar/media/Sidebar.coffee b/plugins/Sidebar/media/Sidebar.coffee index 8ef14b36..037b921c 100644 --- a/plugins/Sidebar/media/Sidebar.coffee +++ b/plugins/Sidebar/media/Sidebar.coffee @@ -416,18 +416,18 @@ class Sidebar extends Class @wrapper.ws.cmd "fileRules", {inner_path: inner_path}, (res) => if @wrapper.site_info.privatekey # Privatekey stored in users.json - @wrapper.ws.cmd "sitePublish", {privatekey: "stored", inner_path: inner_path, sign: true}, (res) => + @wrapper.ws.cmd "sitePublish", {privatekey: "stored", inner_path: inner_path, sign: true, update_changed_files: true}, (res) => if res == "ok" @wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000 else if @wrapper.site_info.auth_address in res.signers # ZeroID or other ID provider - @wrapper.ws.cmd "sitePublish", {privatekey: null, inner_path: inner_path, sign: true}, (res) => + @wrapper.ws.cmd "sitePublish", {privatekey: null, inner_path: inner_path, sign: true, update_changed_files: true}, (res) => if res == "ok" @wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000 else # Ask the user for privatekey @wrapper.displayPrompt "Enter your private key:", "password", "Sign", "", (privatekey) => # Prompt the private key - @wrapper.ws.cmd "sitePublish", {privatekey: privatekey, inner_path: inner_path, sign: true}, (res) => + @wrapper.ws.cmd "sitePublish", {privatekey: privatekey, inner_path: inner_path, sign: true, update_changed_files: true}, (res) => if res == "ok" @wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000 diff --git a/plugins/Sidebar/media/all.js b/plugins/Sidebar/media/all.js index 99c74791..eb878bae 100644 --- a/plugins/Sidebar/media/all.js +++ b/plugins/Sidebar/media/all.js @@ -798,7 +798,8 @@ window.initScrollable = function () { return _this.wrapper.ws.cmd("sitePublish", { privatekey: "stored", inner_path: inner_path, - sign: true + sign: true, + update_changed_files: true }, function(res) { if (res === "ok") { return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000); @@ -808,7 +809,8 @@ window.initScrollable = function () { return _this.wrapper.ws.cmd("sitePublish", { privatekey: null, inner_path: inner_path, - sign: true + sign: true, + update_changed_files: true }, function(res) { if (res === "ok") { return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000); @@ -819,7 +821,8 @@ window.initScrollable = function () { return _this.wrapper.ws.cmd("sitePublish", { privatekey: privatekey, inner_path: inner_path, - sign: true + sign: true, + update_changed_files: true }, function(res) { if (res === "ok") { return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);