Skip to content

Conversation

@gingershaped
Copy link
Contributor

Description

This PR renders m.room.pinned_events state events in the room timeline, including jump links if only a single event was pinned or unpinned (which is the most common case).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@github-actions
Copy link

github-actions bot commented Sep 12, 2025

Preview: https://2482--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

const { pinned } = mEvent.getContent<IRoomPinnedEventsContent>();
const prevPinned = (mEvent.getPrevContent() as Partial<IRoomPinnedEventsContent>).pinned;
const senderId = mEvent.getSender() ?? '';
const senderName = getMxIdLocalPart(senderId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use

getMemberDisplayName(room, senderId) ??
    getMxIdLocalPart(senderId) ??
    senderId;

for displayname

@gingershaped gingershaped requested a review from ajbura September 26, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants