mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix viewing user subscriptions (#21482)
Fix enumeration of user subscriptions. `watch.mode` is not a boolean but a smallint. Fixes #21447 Regression of #17156
This commit is contained in:
		@@ -1496,7 +1496,8 @@ func applySubscribedCondition(sess *xorm.Session, subscriberID int64) *xorm.Sess
 | 
				
			|||||||
			builder.In("issue.repo_id", builder.
 | 
								builder.In("issue.repo_id", builder.
 | 
				
			||||||
				Select("id").
 | 
									Select("id").
 | 
				
			||||||
				From("watch").
 | 
									From("watch").
 | 
				
			||||||
				Where(builder.Eq{"user_id": subscriberID, "mode": true}),
 | 
									Where(builder.And(builder.Eq{"user_id": subscriberID},
 | 
				
			||||||
 | 
										builder.In("mode", repo_model.WatchModeNormal, repo_model.WatchModeAuto))),
 | 
				
			||||||
			),
 | 
								),
 | 
				
			||||||
		),
 | 
							),
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user