Skip to content

Commit

Permalink
message, presence types: Add some fixmes.
Browse files Browse the repository at this point in the history
The Flow bug in question is facebook/flow#8178; it's reportedly
fixed in Flow v0.115; we'll get v0.122 with RN v0.63 (zulip#4245).
  • Loading branch information
chrisbobbe committed Sep 17, 2020
1 parent 1f5bbea commit 863981c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/message/messagesReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default (state: MessagesState = initialState, action: Action): MessagesSt
case MESSAGE_FETCH_COMPLETE:
return {
...state,
// $FlowFixMe - Flow bug; should resolve in #4245
...groupItemsById(
action.messages.map(message =>
omit(message, ['flags', 'match_content', 'match_subject']),
Expand Down
8 changes: 7 additions & 1 deletion src/presence/presenceReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default (state: PresenceState = initialState, action: Action): PresenceSt
case PRESENCE_RESPONSE:
return {
...state,
// $FlowFixMe - Flow bug; should resolve in #4245
...action.presence,
};

Expand All @@ -43,8 +44,13 @@ export default (state: PresenceState = initialState, action: Action): PresenceSt
...state,
[action.email]: {
...state[action.email],
// $FlowFixMe - Flow bug; should resolve in #4245
...action.presence,
aggregated: getAggregatedPresence({ ...state[action.email], ...action.presence }),
aggregated: getAggregatedPresence({
...state[action.email],
// $FlowFixMe - Flow bug; should resolve in #4245
...action.presence,
}),
},
};
}
Expand Down

0 comments on commit 863981c

Please sign in to comment.