fix: Improve plugin ui entry points, Fix chat scroll, fix notifications, fix user rights
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user