Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[multi-device] Save device mappings upon accepting friend request + various fixes #548

Merged
merged 2 commits into from Oct 3, 2019

Conversation

@sachaaaaa
Copy link
Collaborator

commented Oct 2, 2019

  • small refactor here and there
  • when a device accepts a friend request, save all the device mappings related to the other device's primary device
  • fixes for bugs discovered during testing
@sachaaaaa sachaaaaa changed the title Save device mappings upon accepting friend request + various fixes [multi-device] Save device mappings upon accepting friend request + various fixes Oct 2, 2019
async function saveAllPairingAuthorisationsFor(pubKey) {
const deviceMapping = await lokiFileServerAPI.getUserDeviceMapping(pubKey);
let { authorisations } = deviceMapping || {};
if (deviceMapping) {

This comment has been minimized.

Copy link
@msgmaxim

msgmaxim Oct 2, 2019

Collaborator

Could we exit early if !deviceMapping to reduce nesting and move let { authorisations } = deviceMapping; further down?

@sachaaaaa sachaaaaa force-pushed the sachaaaaa:various_fixes branch from 715691f to 53bdf14 Oct 2, 2019
@BeaudanBrown BeaudanBrown merged commit 64a77f9 into loki-project:multi-device Oct 3, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.