mirror of https://github.com/vector-im/riot-web
Fix bug which prevented more than one event getting pinned
parent
8e7e4c9e8d
commit
f8907a6ea4
|
@ -179,7 +179,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
|||
const room = cli.getRoom(this.props.mxEvent.getRoomId());
|
||||
const eventId = this.props.mxEvent.getId();
|
||||
|
||||
const pinnedIds = room?.currentState?.getStateEvents(EventType.RoomPinnedEvents, "")?.pinned || [];
|
||||
const pinnedIds = room?.currentState?.getStateEvents(EventType.RoomPinnedEvents, "")?.getContent().pinned || [];
|
||||
if (pinnedIds.includes(eventId)) {
|
||||
pinnedIds.splice(pinnedIds.indexOf(eventId), 1);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue