Created
January 21, 2017 04:29
-
-
Save kfatehi/1eadea3d554b38f491853a123558c59b to your computer and use it in GitHub Desktop.
matrix sync m.direct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Puppet } = require("matrix-puppet-bridge"); | |
const puppet = new Puppet('./config.json'); | |
puppet.startClient().then(()=>{ | |
let client = puppet.getClient(); | |
client.on('sync', (state) => { | |
if ( state === 'PREPARED' ) | |
console.log(client.store.accountData['m.direct'].event.content); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment