partially address #556 - now comments can only be added after successfull decryption

This commit is contained in:
El RIDO 2020-01-08 19:48:42 +01:00
parent ed590ee557
commit 599264e167
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
3 changed files with 8 additions and 3 deletions

View file

@ -4926,7 +4926,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
plaintexts[i][1]
);
}
DiscussionViewer.finishDiscussion();
});
}
@ -4980,6 +4979,12 @@ jQuery.PrivateBin = (function($, RawDeflate) {
// we have to pass in remaining_time here
TopNav.showEmailButton(paste.getTimeToLive());
}
// only offer adding comments, after paste was successfully decrypted
if (paste.isDiscussionEnabled()) {
DiscussionViewer.finishDiscussion();
}
})
.catch((err) => {
// wait for the user to type in the password,