From a8de307740318b80f6133594421ed6a3eb2f0863 Mon Sep 17 00:00:00 2001 From: Julian Steinwachs Date: Tue, 5 Jan 2016 09:14:23 +0100 Subject: [PATCH] cleint side crypto refinements --- build/app-bundle.js | 6 +++--- build/twister-lib.js | 8 ++++++++ jsx/other/Conversation.js | 2 +- jsx/other/Hashtag.js | 2 +- jsx/profile/Timeline.js | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build/app-bundle.js b/build/app-bundle.js index 4bfa1f9..8356d2b 100644 --- a/build/app-bundle.js +++ b/build/app-bundle.js @@ -1585,7 +1585,7 @@ module.exports = Conversation = React.createClass({displayName: "Conversation", //alert("got event") - this.updatePosts(0); + this.updatePosts(); }, render: function() { @@ -1666,7 +1666,7 @@ module.exports = Hashtag = React.createClass({displayName: "Hashtag", //alert("got event") - this.updatePosts(-1); + this.updatePosts(); }, render: function() { @@ -2064,7 +2064,7 @@ module.exports = Timeline = React.createClass({displayName: "Timeline", //alert("got event") if(this.state.username==event.detail.getUsername()) { - this.addPost(event.detail); + this.updatePosts(); } }, diff --git a/build/twister-lib.js b/build/twister-lib.js index 38a57a5..7f81ed2 100755 --- a/build/twister-lib.js +++ b/build/twister-lib.js @@ -30052,6 +30052,14 @@ TwisterAccount.prototype._signAndPublish = function(post_ori,cbfunc){ console.log("going to verify ",v) + v.sig_userpost = v.sig_userpost.toString("hex"); + + if ("sig_rt" in v.userpost) { + v.userpost.sig_rt = v.userpost.sig_rt.toString("hex"); + } + + thisTorrent._latestId = newid; + Twister.getUser(thisAccount._name)._stream._verifyAndCachePost(v,cbfunc); }); diff --git a/jsx/other/Conversation.js b/jsx/other/Conversation.js index aebeeac..15f2ffb 100755 --- a/jsx/other/Conversation.js +++ b/jsx/other/Conversation.js @@ -87,7 +87,7 @@ module.exports = Conversation = React.createClass({ //alert("got event") - this.updatePosts(0); + this.updatePosts(); }, render: function() { diff --git a/jsx/other/Hashtag.js b/jsx/other/Hashtag.js index 8e92470..10ca22c 100644 --- a/jsx/other/Hashtag.js +++ b/jsx/other/Hashtag.js @@ -65,7 +65,7 @@ module.exports = Hashtag = React.createClass({ //alert("got event") - this.updatePosts(-1); + this.updatePosts(); }, render: function() { diff --git a/jsx/profile/Timeline.js b/jsx/profile/Timeline.js index d1c0ce1..aaea86f 100755 --- a/jsx/profile/Timeline.js +++ b/jsx/profile/Timeline.js @@ -89,7 +89,7 @@ module.exports = Timeline = React.createClass({ //alert("got event") if(this.state.username==event.detail.getUsername()) { - this.addPost(event.detail); + this.updatePosts(); } },