implement 'getCanonicalChannelList'

pull/1/head
ansuz 8 years ago
parent 09f8e139fe
commit e4b15bc616

@ -205,7 +205,7 @@ define([
return hexArray.join("");
};
var deduplicate = common.deduplicateString = function (array) {
var deduplicateString = common.deduplicateString = function (array) {
var a = array.slice();
for(var i=0; i<a.length; i++) {
for(var j=i+1; j<a.length; j++) {
@ -215,6 +215,9 @@ define([
return a;
};
var getCanonicalChannelList = common.getCanonicalChannelList = function () {
return deduplicateString(getUserChannelList()).sort();
};
var parseHash = common.parseHash = function (hash) {
var parsed = {};

@ -11,8 +11,7 @@ define([
var synchronize = function (call) {
// provide a sorted list of unique channels
var list = Cryptpad.deduplicateString(Cryptpad.getUserChannelList())
.sort();
var list = Cryptpad.getCanonicalChannelList();
var localHash = call.hashChannelList(list);
var serverHash;

Loading…
Cancel
Save