RoleColorEverywhere: only colour sent messages (ignore pending/failed) (#3895)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
Elvyra 2026-01-09 21:53:30 +00:00 • committed by GitHub
parent 98a38642c7
commit 58815b642e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -192,6 +192,9 @@ export default definePlugin({
const { messageSaturation } = settings.use(["messageSaturation"]);
const author = useMessageAuthor(message);
// Do not apply role color if the send fails, otherwise it becomes indistinguishable if the message is sent
if (message.state !== "SENT") return;
if (author.colorString != null && messageSaturation !== 0) {
const value = `color-mix(in oklab, ${author.colorString} ${messageSaturation}%, var({DEFAULT}))`;