Files
dms-chat/settings/MatrixSettingsPanel.qml
SalastilandClaude Sonnet 5 20389e7396 Add Matrix verification/backup, per-protocol join pages, Discord friends, and expired-media/auth-failure recovery
- Matrix: interactive device verification (SAS emoji flow), recovery-key
  backup/restore, membership announcement moderation, member/room avatars,
  power-level-aware moderation menu, and an encryption lock indicator on
  the composer - verified live with two independent devices.
- Replace the single combined join panel with a dedicated page per
  protocol (IrcJoinPanel/MatrixJoinPanel/DiscordJoinPanel), routed by
  whichever account the "+" button was clicked for rather than listing
  every account in one expandable page.
- Discord: friends list (Online/All, click-to-DM, add-friend, matches
  READY's relationships + live PRESENCE_UPDATE), create-a-server, and
  join-by-invite alongside the existing DM-by-ID flow.
- Discord: an expired attachment-link fallback ("Open in Discord") for
  scrollback media whose signed cdn.discordapp.com URL has lapsed -
  Discord's own /attachments/refresh-urls re-sign endpoint hard-rejects
  this backend's user-token requests, confirmed live, so this opens the
  real message instead of showing a broken embed.
- Discord: detect gateway close code 4004 (revoked token) as a distinct
  ConnState::AuthFailed instead of retrying a dead credential forever;
  the Accounts pane shows a clear "needs login" state that routes
  straight to a fresh QR login, which upserts the same account id in
  place (no lost buffers/scrollback).
- Fix the unread-DM pinned-buffer flash never reliably triggering: an
  implicit property binding computed via nested closures over two
  separate properties wasn't consistently re-evaluated by QML's
  dependency tracker; replaced with an explicit recompute function called
  at every actual mutation point.
- Fix ChatBarWidget.qml's pill double-padding against BasePill's own
  padding.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-21 12:30:46 -04:00

60 lines
1.9 KiB
QML

import QtQuick
import qs.Common
import qs.Widgets
import qs.Modules.Plugins
// Matrix's own settings area, loaded by ChatSettings.qml's protocol rail -
// see IrcSettingsPanel.qml's own doc comment for the general pattern.
// Deliberately just the membership-announcement toggles for now - account-
// level things (session verification, recovery key/backup, device
// management) live under each account's own row in AccountsPanel.qml
// instead, not here (a room-open toggle isn't tied to any one account the
// way those are).
PluginSettings {
id: root
pluginId: "dankChat"
StyledText {
width: parent.width
text: "Membership announcements"
font.weight: Font.Medium
color: Theme.surfaceVariantText
}
StyledText {
width: parent.width
text: "Shown as chat messages in the room they happened in - chatd always records them regardless of these toggles, so turning one on retroactively reveals events that already happened while it was off."
wrapMode: Text.WordWrap
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
ToggleSetting {
settingKey: "matrix.showJoinMessages"
label: "Show join messages"
description: "\"X joined the room\""
defaultValue: true
}
ToggleSetting {
settingKey: "matrix.showInviteMessages"
label: "Show invite messages"
description: "\"X was invited by Y\""
defaultValue: true
}
ToggleSetting {
settingKey: "matrix.showKickMessages"
label: "Show kick/ban messages"
description: "\"X was kicked by Y\" or \"X was banned by Y\", including the reason if one was given"
defaultValue: true
}
ToggleSetting {
settingKey: "matrix.showQuitMessages"
label: "Show quit messages"
description: "\"X left the room\""
defaultValue: true
}
}