Skip to content

Instantly share code, notes, and snippets.

@kfatehi
Created January 21, 2017 04:29
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 kfatehi/1eadea3d554b38f491853a123558c59b to your computer and use it in GitHub Desktop.
Save kfatehi/1eadea3d554b38f491853a123558c59b to your computer and use it in GitHub Desktop.
matrix sync m.direct
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