Fix reacting to messages with reactions from other users

Signed-off-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
Tulir Asokan 2019-10-16 21:35:08 +03:00
parent 6ce2e3d796
commit 30ffd65b6c

View file

@ -75,7 +75,7 @@ class ReactionPicker extends React.Component {
return {}; return {};
} }
const userId = MatrixClientPeg.get().getUserId(); const userId = MatrixClientPeg.get().getUserId();
const myAnnotations = this.props.reactions.getAnnotationsBySender()[userId]; const myAnnotations = this.props.reactions.getAnnotationsBySender()[userId] || [];
return Object.fromEntries([...myAnnotations] return Object.fromEntries([...myAnnotations]
.filter(event => !event.isRedacted()) .filter(event => !event.isRedacted())
.map(event => [event.getRelation().key, event.getId()])); .map(event => [event.getRelation().key, event.getId()]));