Commit 64298be
authored
fix(realtime): forward all caller opts from track() to send() (#1620)
## Summary
`RealtimeChannel.track()` only forwarded `timeout` to the underlying
`send()`, rebuilding the opts map as `{'timeout': opts['timeout'] ??
_timeout}` and silently dropping any other caller-supplied options. It
now forwards the full `opts` map, matching `untrack()` and the
supabase-js behavior. The timeout fallback is preserved because `send()`
already resolves `opts['timeout'] ?? _timeout`.
**Outcome:** implemented (bug-fix)
## Tests
Added a `track opts forwarding` group in `channel_test.dart` verifying
that a custom non-timeout opt, a custom timeout opt, and the empty
default all reach `send()` unchanged. Full `channel_test.dart` passes
(57 tests).
## References
- Linear: SDK-1321
- supabase-js: PR #2490 / commit `7fd2bc39`
## Compliance matrix
`realtime.presence.track` was already `implemented` with symbol
`RealtimeChannel.track`; this fix corrects its behavior without adding
new public symbols, so no matrix change was required.1 parent 2fbb7bf commit 64298be
2 files changed
Lines changed: 66 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
838 | 883 | | |
839 | 884 | | |
840 | 885 | | |
| |||
1330 | 1375 | | |
1331 | 1376 | | |
1332 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
0 commit comments