Fix push notification sent without own thread subscription (#2123)
This commit is contained in:
		
							parent
							
								
									1147e1fb81
								
							
						
					
					
						commit
						eebc791683
					
				@ -259,7 +259,7 @@ export const notifyItemParents = async ({ models, item }) => {
 | 
			
		||||
      )
 | 
			
		||||
      AND EXISTS (
 | 
			
		||||
        -- check that there is at least one parent subscribed to this thread
 | 
			
		||||
        SELECT 1 FROM "ThreadSubscription" ts WHERE p.id = ts."itemId"
 | 
			
		||||
        SELECT 1 FROM "ThreadSubscription" ts WHERE p.id = ts."itemId" AND p."userId" = ts."userId"
 | 
			
		||||
      )`
 | 
			
		||||
    await Promise.allSettled(
 | 
			
		||||
      parents.map(({ userId, isDirect }) => {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user