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
F1721700: D9129.id31093.diff
Thu, May 9, 2:57 PM
Unknown Object (File)
Sat, May 4, 12:05 PM
Unknown Object (File)
Sat, May 4, 12:05 PM
Unknown Object (File)
Sat, May 4, 12:05 PM
Unknown Object (File)
Sat, May 4, 12:05 PM
Unknown Object (File)
Sat, May 4, 12:02 PM
Unknown Object (File)
Sat, May 4, 11:30 AM
Unknown Object (File)
Tue, Apr 30, 8:28 PM
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