nl_tokens: @module @lobsangnet / lobsang - connect - matrix / connect Connects to a MatrixClient and resolves once connection was established .
pl_tokens: function connect ( client ) { client . startClient ( ) return new Promise ( ( resolve , reject ) => { client . once ( 'sync' , ( state ) => { if ( <mask> . isSyncState ( state ) ) { return resolve ( client ) } else { return reject ( new Error ( 'Client could not sync' ) ) } } ) } ) }