fix: floating promises and fork usage on login saga (#5589)
This commit is contained in:
parent
65660f530a
commit
fb9c271fa4
|
@ -146,6 +146,8 @@ export function getCustomEmojis() {
|
|||
if (changedEmojis) {
|
||||
setCustomEmojis();
|
||||
}
|
||||
|
||||
return resolve();
|
||||
} catch (e) {
|
||||
log(e);
|
||||
return resolve();
|
||||
|
|
|
@ -70,6 +70,7 @@ export function getSlashCommands() {
|
|||
return allRecords.length;
|
||||
});
|
||||
}
|
||||
return resolve();
|
||||
} catch (e) {
|
||||
log(e);
|
||||
return resolve();
|
||||
|
|
|
@ -168,10 +168,6 @@ const fetchEnterpriseModulesFork = function* fetchEnterpriseModulesFork({ user }
|
|||
}
|
||||
};
|
||||
|
||||
const fetchRoomsFork = function* fetchRoomsFork() {
|
||||
yield put(roomsRequest());
|
||||
};
|
||||
|
||||
const fetchUsersRoles = function* fetchRoomsFork() {
|
||||
const roles = yield Services.getUsersRoles();
|
||||
if (roles.length) {
|
||||
|
@ -184,7 +180,7 @@ const handleLoginSuccess = function* handleLoginSuccess({ user }) {
|
|||
getUserPresence(user.id);
|
||||
|
||||
const server = yield select(getServer);
|
||||
yield fork(fetchRoomsFork);
|
||||
yield put(roomsRequest());
|
||||
yield fork(fetchPermissionsFork);
|
||||
yield fork(fetchCustomEmojisFork);
|
||||
yield fork(fetchRolesFork);
|
||||
|
|
Loading…
Reference in New Issue