feat: system messages, group DM welcome header, and dm_owner_updated event

- Render system messages (member_added, member_removed, owner_changed) inline
  in MessageList with icon + human-readable text; system messages never group
  with adjacent user messages
- Rewrite WelcomeHeader to branch on ownerId: group DMs show overlapping avatars,
  group name, creator attribution, federated privacy note, and a Leave Group button
- Add dm_owner_updated ServerEvent; broadcast from dm.ts leave handler and
  federation processOwnershipTransferEvent so all clients update ownerId in real-time
- Add updateDmOwner action to spaceStore and handle dm_owner_updated in useWebSocket
- Add leaveGroup alias to API client dm namespace
This commit is contained in:
Jannis Braun
2026-03-27 05:43:30 +01:00
parent 2eeca93268
commit c3191be4e7
7 changed files with 155 additions and 7 deletions
+1
View File
@@ -413,6 +413,7 @@ export type ServerEvent =
| { type: 'embeds_resolved'; messageId: string; channelId: string; embeds: Embed[] }
| { type: 'dm_embeds_resolved'; messageId: string; dmChannelId: string; embeds: Embed[] }
| { type: 'federation_file_rejected'; messageId: string; dmChannelId: string; attachmentId: string; affectedUsers: Array<{ userId: string; username: string; limit: number }> }
| { type: 'dm_owner_updated'; dmChannelId: string; newOwnerId: string }
| { type: 'pong' }
| { type: 'error'; message: string };