From 87ddf4353e1a0d65727259cb81caec3789c2b3f4 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Tue, 8 Sep 2020 13:56:47 -0700 Subject: [PATCH] message, presence types: Add some fixmes. 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 (#4245). --- src/message/messagesReducer.js | 1 + src/presence/presenceReducer.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/message/messagesReducer.js b/src/message/messagesReducer.js index c597c28d72e..85bf86b3ef2 100644 --- a/src/message/messagesReducer.js +++ b/src/message/messagesReducer.js @@ -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']), diff --git a/src/presence/presenceReducer.js b/src/presence/presenceReducer.js index f66aeb36222..fc8247efe54 100644 --- a/src/presence/presenceReducer.js +++ b/src/presence/presenceReducer.js @@ -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, }; @@ -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, + }), }, }; }