diff --git a/changelog.d/+a3260bd06.bugfix.md b/changelog.d/+a3260bd06.bugfix.md new file mode 100644 index 000000000..8fefe4a60 --- /dev/null +++ b/changelog.d/+a3260bd06.bugfix.md @@ -0,0 +1 @@ +Fixed `roomuserid_lastnotificationread` being aliased to the highlight count table, which clobbered highlight counts when setting a read marker. Contributed by @eleboucher diff --git a/src/database/maps.rs b/src/database/maps.rs index 40336ee17..19e786ebf 100644 --- a/src/database/maps.rs +++ b/src/database/maps.rs @@ -478,6 +478,10 @@ pub(super) static MAPS: &[Descriptor] = &[ name: "logintoken_expiresatuserid", ..descriptor::RANDOM_SMALL }, + Descriptor { + name: "roomuserid_lastnotificationread", + ..descriptor::RANDOM + }, Descriptor { name: "userroomid_highlightcount", ..descriptor::RANDOM diff --git a/src/service/rooms/user/mod.rs b/src/service/rooms/user/mod.rs index 9705e2e3f..a6c9a20e8 100644 --- a/src/service/rooms/user/mod.rs +++ b/src/service/rooms/user/mod.rs @@ -27,7 +27,8 @@ impl crate::Service for Service { db: Data { userroomid_notificationcount: args.db["userroomid_notificationcount"].clone(), userroomid_highlightcount: args.db["userroomid_highlightcount"].clone(), - roomuserid_lastnotificationread: args.db["userroomid_highlightcount"].clone(), + roomuserid_lastnotificationread: args.db["roomuserid_lastnotificationread"] + .clone(), }, services: Services { globals: args.depend::("globals"),