Commit 0170242
Fix poll expiry notifications not showing up
The poll notification query was incorrectly joining with accountOwners,
which filtered out polls from remote users. This meant users wouldn't
receive notifications for expired polls they had voted on if the poll
was created by a remote user.
Fixed by:
- Removing the unnecessary INNER JOIN with accountOwners table
- Checking posts.accountId = owner.id directly for author check
- Checking pollVotes.accountId = owner.id directly for voter check
Now users receive poll expiry notifications for:
- Polls they authored (local polls)
- Polls they voted on (including remote polls)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 9b8b069 commit 0170242
1 file changed
+6
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 16 | + | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
| |||
210 | 204 | | |
211 | 205 | | |
212 | 206 | | |
| 207 | + | |
| 208 | + | |
213 | 209 | | |
214 | 210 | | |
215 | 211 | | |
216 | 212 | | |
217 | | - | |
218 | 213 | | |
219 | 214 | | |
220 | 215 | | |
221 | 216 | | |
222 | | - | |
223 | | - | |
| 217 | + | |
| 218 | + | |
224 | 219 | | |
225 | 220 | | |
226 | 221 | | |
227 | | - | |
228 | 222 | | |
229 | | - | |
| 223 | + | |
230 | 224 | | |
231 | 225 | | |
232 | 226 | | |
| |||
0 commit comments