diff --git a/www/contacts2/messenger-ui.js b/www/contacts2/messenger-ui.js index 4ce818d7f..759db183c 100644 --- a/www/contacts2/messenger-ui.js +++ b/www/contacts2/messenger-ui.js @@ -4,6 +4,7 @@ define([ '/common/hyperscript.js', '/bower_components/marked/marked.min.js', ], function ($, Cryptpad, h, Marked) { + 'use strict'; // TODO use our fancy markdown and support media-tags Marked.setOptions({ sanitize: true, }); @@ -22,7 +23,6 @@ define([ var initChannel = function (state, curvePublic, info) { console.log('initializing channel for [%s]', curvePublic); - //console.log(info); state.channels[curvePublic] = { messages: [], HEAD: info.lastKnownHash, @@ -317,7 +317,7 @@ define([ // TODO remove friend from userlist ui // FIXME seems to trigger EJOINED from netflux-websocket (from server); // (tried to join a channel in which you were already present) - }); + }, undefined, true); }); if (data.avatar && avatars[data.avatar]) { @@ -338,7 +338,6 @@ define([ var initializing = true; - // TODO handle scrolling. messenger.on('message', function (message) { console.log(JSON.stringify(message)); if (!initializing) { Cryptpad.notify(); } @@ -372,7 +371,6 @@ define([ return void notify(curvePublic); } unnotify(curvePublic); - // TODO notify if a message is newer than `lastKnownHash` }); messenger.on('join', function (curvePublic, channel) {