fix: presence ring shape mismatch, edit history (no text) on E2EE, reaction count

- PresenceRingAvatar: replace circular wrapper div (borderRadius 50%) with
  React.cloneElement injecting outline+outlineOffset directly onto the child
  Avatar element — outline follows the child's actual border-radius so the
  ring matches the avatar shape in every context

- EditHistoryModal: use getClearContent() for the Original entry instead of
  evt.event.content, which is still the ciphertext for E2EE messages and has
  no body field. getClearContent() returns decrypted content bypassing the
  _replacingEvent chain, fixing the "(no text)" shown for encrypted originals

- MessageQuickReactions: 5 → 3 emoji (toolbar too wide with 5)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 00:30:42 -04:00
parent 8866da0a82
commit b5d831cc12
2 changed files with 20 additions and 17 deletions
@@ -72,9 +72,14 @@ function renderContent(source: Record<string, unknown>): ReactNode {
}
function getOriginalContent(evt: MatrixEvent): ReactNode {
// mEvent.getContent() returns the SDK-applied post-edit content.
// Read the raw server event to get the actual original pre-edit text.
const raw = (evt.event as { content?: Record<string, unknown> }).content ?? {};
// For E2EE events, evt.event.content is the ciphertext (no body field) — "(no text)" bug.
// getClearContent() returns the decrypted original content, bypassing _replacingEvent,
// so it gives us the pre-edit body even when the SDK has an edit applied.
// For unencrypted events, getClearContent() returns null, so we fall back to event.content.
const raw =
(evt.getClearContent() as Record<string, unknown> | null) ??
(evt.event as { content?: Record<string, unknown> }).content ??
{};
return renderContent(raw);
}