message: Fix wrongly showing unpin in pinned messages tile with no perms
diff: @@ -122,9 +122,7 @@ const PinnedMessagesCard = ({ room, onClose }: IProps) => {
  if (!pinnedEvents) {
  content = <Spinner />;
  } else if (pinnedEvents.length > 0) {
  - let onUnpinClicked;
  - if (canUnpin) {
  - onUnpinClicked = async (event: MatrixEvent) => {
  + const onUnpinClicked = async (event: MatrixEvent) => {
  const pinnedEvents = room.currentState.getStateEvents(EventType.RoomPinnedEvents, "");
  if (pinnedEvents?.getContent()?.pinned) {
  const pinned = pinnedEvents.getContent().pinned;
  @@ -135,11 +133,15 @@ const PinnedMessagesCard = ({ room, onClose }: IProps) => {
  }
  }
  };
  - }
  // show them in reverse, with latest pinned at the top
  content = pinnedEvents.filter(Boolean).reverse().map(ev => (
  - <PinnedEventTile key={ev.getId()} room={room} event={ev} onUnpinClicked={() => onUnpinClicked(ev)} />
  + <PinnedEventTile
  + key={ev.getId()}
  + room={room}
  + event={ev}
  + onUnpinClicked={canUnpin ? () => onUnpinClicked(ev) : undefined}
  + />
  ));
  } else {
  content = <div className="mx_PinnedMessagesCard_empty">
  