Remove unused function
This was supposed to solve the problem of losing group state after a reinstall
by inspecting member registration ids and pre-emptively sending group updates to
those who appear newly re-registered, but it has been unused since 6123c419
.
Nowadays there's a protocol for requesting lost group state from other members.
// FREEBIE
This commit is contained in:
parent
80bfe18f02
commit
89a7875747
2 changed files with 2 additions and 40 deletions
|
@ -37025,26 +37025,7 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ
|
||||||
|
|
||||||
return textsecure.storage.groups.addNumbers(groupId, added);
|
return textsecure.storage.groups.addNumbers(groupId, added);
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
|
||||||
needUpdateByDeviceRegistrationId: function(groupId, number, encodedNumber, registrationId) {
|
|
||||||
return textsecure.storage.protocol.getGroup(groupId).then(function(group) {
|
|
||||||
if (group === undefined)
|
|
||||||
throw new Error("Unknown group for device registration id");
|
|
||||||
|
|
||||||
if (group.numberRegistrationIds[number] === undefined)
|
|
||||||
throw new Error("Unknown number in group for device registration id");
|
|
||||||
|
|
||||||
if (group.numberRegistrationIds[number][encodedNumber] == registrationId)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var needUpdate = group.numberRegistrationIds[number][encodedNumber] !== undefined;
|
|
||||||
group.numberRegistrationIds[number][encodedNumber] = registrationId;
|
|
||||||
return textsecure.storage.protocol.putGroup(groupId, group).then(function() {
|
|
||||||
return needUpdate;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
@ -143,25 +143,6 @@
|
||||||
|
|
||||||
return textsecure.storage.groups.addNumbers(groupId, added);
|
return textsecure.storage.groups.addNumbers(groupId, added);
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
|
||||||
needUpdateByDeviceRegistrationId: function(groupId, number, encodedNumber, registrationId) {
|
|
||||||
return textsecure.storage.protocol.getGroup(groupId).then(function(group) {
|
|
||||||
if (group === undefined)
|
|
||||||
throw new Error("Unknown group for device registration id");
|
|
||||||
|
|
||||||
if (group.numberRegistrationIds[number] === undefined)
|
|
||||||
throw new Error("Unknown number in group for device registration id");
|
|
||||||
|
|
||||||
if (group.numberRegistrationIds[number][encodedNumber] == registrationId)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var needUpdate = group.numberRegistrationIds[number][encodedNumber] !== undefined;
|
|
||||||
group.numberRegistrationIds[number][encodedNumber] = registrationId;
|
|
||||||
return textsecure.storage.protocol.putGroup(groupId, group).then(function() {
|
|
||||||
return needUpdate;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue