@@ -656,13 +656,14 @@ OlmDevice.prototype.getSessionIdsForDevice = async function(theirDeviceIdentityK
656656 * @param {boolean } nowait Don't wait for an in-progress session to complete.
657657 * This should only be set to true of the calling function is the function
658658 * that marked the session as being in-progress.
659+ * @param {Logger } [log] A possibly customised log
659660 * @return {Promise<?string> } session id, or null if no established session
660661 */
661662OlmDevice . prototype . getSessionIdForDevice = async function (
662- theirDeviceIdentityKey , nowait ,
663+ theirDeviceIdentityKey , nowait , log ,
663664) {
664665 const sessionInfos = await this . getSessionInfoForDevice (
665- theirDeviceIdentityKey , nowait ,
666+ theirDeviceIdentityKey , nowait , log ,
666667 ) ;
667668
668669 if ( sessionInfos . length === 0 ) {
@@ -702,10 +703,13 @@ OlmDevice.prototype.getSessionIdForDevice = async function(
702703 * @param {boolean } nowait Don't wait for an in-progress session to complete.
703704 * This should only be set to true of the calling function is the function
704705 * that marked the session as being in-progress.
706+ * @param {Logger } [log] A possibly customised log
705707 * @return {Array.<{sessionId: string, hasReceivedMessage: Boolean}> }
706708 */
707- OlmDevice . prototype . getSessionInfoForDevice = async function ( deviceIdentityKey , nowait ) {
708- const log = logger . withPrefix ( "[getSessionInfoForDevice]" ) ;
709+ OlmDevice . prototype . getSessionInfoForDevice = async function (
710+ deviceIdentityKey , nowait , log = logger ,
711+ ) {
712+ log = log . withPrefix ( "[getSessionInfoForDevice]" ) ;
709713
710714 if ( this . _sessionsInProgress [ deviceIdentityKey ] && ! nowait ) {
711715 log . debug ( `Waiting for Olm session for ${ deviceIdentityKey } to be created` ) ;
0 commit comments