mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-04 18:18:46 +00:00
Tweak stream filtering logic
This commit is contained in:
@@ -54,7 +54,10 @@ const unsubscribe = function(id){
|
||||
Stream.on('sendUpdate', (event, data)=>{
|
||||
if(DEBUG.showEvents) console.log('Event:', event, '\nData:', data);
|
||||
subscribers
|
||||
.filter((sub)=>{return data.shareId == sub.shareId; })
|
||||
.filter((sub)=>{
|
||||
if(data?.id) return data.id == sub.id;
|
||||
return data.shareId == sub.shareId;
|
||||
})
|
||||
.forEach((sub)=>{
|
||||
if(event == 'brewUpdated'){
|
||||
// Reset the unsubscription timer
|
||||
|
||||
Reference in New Issue
Block a user