Page MenuHomePhabricator

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

Authored by varun on Mon, Sep 11, 10:37 AM.



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

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Tue, Sep 12, 2:17 AM
ashoat requested changes to this revision.Tue, Sep 12, 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.Tue, Sep 12, 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.Wed, Sep 13, 12:24 PM