Page MenuHomePhabricator

[lib] utility function to get array of OneTimeKeys from an OLMOneTimeKeys object
ClosedPublic

Authored by varun on Sep 11 2023, 10:37 AM.
Tags
None
Referenced Files
F3570137: D9129.diff
Sat, Dec 28, 3:54 AM
Unknown Object (File)
Tue, Dec 17, 8:01 AM
Unknown Object (File)
Sun, Dec 15, 3:59 AM
Unknown Object (File)
Sun, Dec 15, 3:59 AM
Unknown Object (File)
Sun, Dec 15, 3:59 AM
Unknown Object (File)
Sun, Dec 15, 3:59 AM
Unknown Object (File)
Sun, Dec 15, 3:58 AM
Unknown Object (File)
Sun, Dec 15, 3:46 AM
Subscribers

Details

Summary

we need to do this in web/native(/keyserver?) so created a small utility function

Depends on D9127

Test Plan

called the function and got back an array of keys

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 12 2023, 2:17 AM
ashoat requested changes to this revision.Sep 12 2023, 11:28 AM

Can we dedup this with the existing getOneTimeKeyValues? Looks like D8751 moves it around.

It looks like that one does JSON.parse and this one doesn't... if necessary we can keep two of them around, but:

  1. They should be in the same place
  2. One should call the other
  3. They should have different names
This revision now requires changes to proceed.Sep 12 2023, 11:28 AM

D8751 has been landed now, so it should be easier to dedup :)

I found it confusing that we were using oneTimeKey instead of oneTimeKeys for arrays of keys so I changed that as well here

resolve ESLint/Flow/Jest issues

This revision is now accepted and ready to land.Sep 13 2023, 12:24 PM