Skip to content

Commit

Permalink
fix #1299 bad rejoin facilitator logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkrick committed Aug 24, 2017
1 parent 7c546fc commit 129c762
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/server/graphql/models/Team/notifySlack/notifySlack.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ const notifySlack = async (integrations, teamId, slackText) => {
const provider = await r.table('Provider')
.getAll(teamId, {index: 'teamId'})
.filter({service: SLACK, isActive: true})
.nth(0);
.nth(0)
.default(null);
if (!provider) {
throw new Error('SlackIntegration exists without Provider! Something is fishy');
}
// for each slack channel, send a notification
for (let i = 0; i < integrations.length; i++) {
const integration = integrations[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,10 @@ export default class MeetingContainer extends Component {
|| ((localPhase === CHECKIN || localPhase === UPDATES) && members.length < localPhaseItem)) {
return <LoadingView />;
}
const phasesAlwaysInSync = ['lobby', 'firstcall', 'lastcall'];
const inSync = isFacilitating || phasesAlwaysInSync.includes(meetingPhase) ? true :
localPhase + localPhaseItem === facilitatorPhase + facilitatorPhaseItem;

const inSync = isFacilitating || facilitatorPhase === localPhase &&
// FIXME remove || when changing to relay. right now it's a null & an undefined
(facilitatorPhaseItem === localPhaseItem || !facilitatorPhaseItem && !localPhaseItem);
const rejoinFacilitator = () => {
const pushURL = makePushURL(teamId, facilitatorPhase, facilitatorPhaseItem);
history.push(pushURL);
Expand Down

0 comments on commit 129c762

Please sign in to comment.