fix: Improve plugin ui entry points, Fix chat scroll, fix notifications, fix user rights

This commit is contained in:
2026-05-17 16:09:16 +02:00
parent 8e3ccf4157
commit 8631290c01
35 changed files with 1560 additions and 619 deletions

View File

@@ -195,6 +195,7 @@ Additional runtime guards:
- Deleted messages never notify.
- The current user's own messages never notify.
- Live room messages only notify when the message room is the current room or one of the user's saved rooms.
- Duplicate live events are suppressed with a rolling in-memory set of the last 500 notified message IDs.
- Unread badges are independent from mute state. Muting changes delivery only; it does not hide unread indicators.

View File

@@ -172,6 +172,12 @@ export class NotificationsService {
return;
}
const room = this.getKnownRoom(message.roomId);
if (!room) {
return;
}
this.rememberMessageId(message.id);
const channelId = resolveMessageChannelId(message);
@@ -198,7 +204,6 @@ export class NotificationsService {
return;
}
const room = getRoomById(context.rooms, message.roomId);
const payload = buildNotificationDisplayPayload(
message,
room,
@@ -512,6 +517,11 @@ export class NotificationsService {
return this.getCurrentUserIds().has(senderId);
}
private getKnownRoom(roomId: string): Room | null {
return getRoomById(this.savedRooms(), roomId)
?? (this.currentRoom()?.id === roomId ? this.currentRoom() ?? null : null);
}
private setSettings(settings: NotificationsSettings): void {
this._settings.set(settings);
this.storage.save(settings);