Jyyjy commented on code in PR #412: URL: https://github.com/apache/flagon-useralejs/pull/412#discussion_r1491820067
########## src/UserALEWebExtension/background.js: ########## @@ -63,27 +65,44 @@ function filterUrl(log) { return false; } +// Sets http session id of tab logs to that of the target tab +function injectSessions(log) { + let id = log.details.id; + if(id in tabToHttpSession) { + log.httpSession = tabToHttpSession[id]; + } else { + log.httpSession = null + } + log.browserSessionId = browserSessionId; + return log; +} + browser.storage.local.get(defaultConfig, (res) => { // Apply url filter to logs generated by the background page. - userale.addCallbacks({filterUrl}); + userale.addCallbacks({filterUrl, injectSessions}); updateConfig(res); + browserSessionId = JSON.parse(window.sessionStorage.getItem('userAleHttpSessionId')); Review Comment: Yes it is the only place, and it comes from userAleHTTPSessionId because browser session is equivalent to the http session of the background page. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@flagon.apache.org For additional commands, e-mail: notifications-h...@flagon.apache.org