mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
fix: route room-scoped default messengers under /room/{key} to match client request routing
This commit is contained in:
parent
4926b005d6
commit
592ece5a3d
1 changed files with 4 additions and 1 deletions
|
|
@ -286,7 +286,10 @@ namespace PepperDash.Essentials
|
||||||
if (!entry.Matches(device))
|
if (!entry.Matches(device))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var messenger = entry.Factory(device, $"/device/{device.Key}", Key);
|
// Room-scoped messengers must share the room bridge's "/room/{key}" path so client requests route correctly
|
||||||
|
var basePath = device is IEssentialsRoom ? $"/room/{device.Key}" : $"/device/{device.Key}";
|
||||||
|
|
||||||
|
var messenger = entry.Factory(device, basePath, Key);
|
||||||
|
|
||||||
if (messenger == null)
|
if (messenger == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue