Skip to content

Instantly share code, notes, and snippets.

@auscompgeek
Created May 19, 2020 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auscompgeek/9852b527794c16555667ac2d28aa576a to your computer and use it in GitHub Desktop.
Save auscompgeek/9852b527794c16555667ac2d28aa576a to your computer and use it in GitHub Desktop.
Export verified device keys from Riot
indexedDB.open('matrix-js-sdk:crypto').onsuccess = (e) => e.target.result.transaction('device_data').objectStore('device_data').get('-').onsuccess = (e) => {
for (let [mxid, user_devices] of Object.entries(e.target.result.devices))
for (let [device_id, device] of Object.entries(user_devices))
if (device.verified === 1)
console.log('/verify', mxid, device_id, device.keys['ed25519:' + device_id]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment