Don't ask for password when receiving a pad from the notifications

This commit is contained in:
yflory
2019-07-01 18:19:38 +02:00
parent 7a0f30488c
commit 520655856b
2 changed files with 11 additions and 1 deletions

View File

@@ -57,7 +57,12 @@ define([
.html(Messages._getKey(key, [msg.content.name || Messages.anonymous, msg.content.title]));
$(el).find('.cp-notification-content').addClass("cp-clickable")
.click(function () {
common.openURL(msg.content.href);
var todo = function () { common.openURL(msg.content.href); };
if (!msg.content.password) { return void todo(); }
common.getSframeChannel().query('Q_SESSIONSTORAGE_PUT', {
key: 'newPadPassword',
value: msg.content.password
}, todo);
});
$(el).find('.cp-notification-dismiss').css('display', 'flex');
};