Add getunopenedchatchannels to onboardingredirect (#3565)

This commit is contained in:
Ben Halpern 2019-07-29 09:33:36 -04:00 committed by Mac Siri
parent 7640f6d6f3
commit ee00b460bf

View file

@ -1,4 +1,5 @@
import { getUserDataAndCsrfToken } from '../chat/util';
import getUnopenedChannels from '../src/utils/getUnopenedChannels';
HTMLDocument.prototype.ready = new Promise(resolve => {
if (document.readyState !== 'loading') {
@ -28,6 +29,7 @@ document.ready.then(
.then(({ currentUser, csrfToken }) => {
window.currentUser = currentUser;
window.csrfToken = csrfToken;
getUnopenedChannels();
if (redirectableLocation() && !onboardingSkippable(currentUser)) {
window.location = `${window.location.origin}/onboarding?referrer=${window.location}`;