lint compliance
This commit is contained in:
parent
ba9696ba33
commit
fc95f1b6a8
@ -264,8 +264,9 @@ define([
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parsed;
|
||||||
try {
|
try {
|
||||||
var parsed = JSON.parse(decryptedMsg);
|
parsed = JSON.parse(decryptedMsg);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(decryptedMsg);
|
console.error(decryptedMsg);
|
||||||
return;
|
return;
|
||||||
@ -324,7 +325,6 @@ define([
|
|||||||
|
|
||||||
var createChatBox = function (common, $container, curvePublic, messenger) {
|
var createChatBox = function (common, $container, curvePublic, messenger) {
|
||||||
var data = getFriend(common, curvePublic);
|
var data = getFriend(common, curvePublic);
|
||||||
var proxy = common.getProxy();
|
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
var channel = channels[data.channel];
|
var channel = channels[data.channel];
|
||||||
@ -393,7 +393,7 @@ define([
|
|||||||
channel.send(payload, function (e) {
|
channel.send(payload, function (e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
channel.sending = false;
|
channel.sending = false;
|
||||||
console.error(err);
|
console.error(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$input.val('');
|
$input.val('');
|
||||||
@ -508,6 +508,7 @@ define([
|
|||||||
channel.lastDisplayed = i-1;
|
channel.lastDisplayed = i-1;
|
||||||
channel.unnotify();
|
channel.unnotify();
|
||||||
|
|
||||||
|
// return void channel.notify();
|
||||||
if (messages.length > 10) {
|
if (messages.length > 10) {
|
||||||
var lastKnownMsg = messages[messages.length - 11];
|
var lastKnownMsg = messages[messages.length - 11];
|
||||||
channel.setLastMessageRead(lastKnownMsg.sig);
|
channel.setLastMessageRead(lastKnownMsg.sig);
|
||||||
@ -675,6 +676,12 @@ define([
|
|||||||
setLastMessageRead: function (hash) {
|
setLastMessageRead: function (hash) {
|
||||||
data.lastKnownHash = hash;
|
data.lastKnownHash = hash;
|
||||||
},
|
},
|
||||||
|
getLastMessageRead: function () {
|
||||||
|
return data.lastKnownHash;
|
||||||
|
},
|
||||||
|
isActive: function () {
|
||||||
|
return data.curvePublic === Msg.active;
|
||||||
|
},
|
||||||
getMessagesSinceDisconnect: function () {
|
getMessagesSinceDisconnect: function () {
|
||||||
getChannelMessagesSince(network, chan, data, keys);
|
getChannelMessagesSince(network, chan, data, keys);
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user