Commit f1b974e
Cross-SDK: derive requestPermission from handler presence on session.create
TS, C#, Go, and Python all currently hardcoded requestPermission: true
on session.create regardless of whether the caller supplied an
onPermissionRequest handler. (Resume / join paths already derived from
handler presence.)
The runtime supports the presence-derived shape: when no client opts
in via requestPermission=true, the session short-circuits permission
prompts with user-not-available instead of broadcasting. So the
hardcoded true forced the runtime to broadcast permission events to
clients that would never respond, wasting a roundtrip and creating a
discrepancy between create and resume.
Aligns all four SDKs to: requestPermission := onPermissionRequest != null
on both session.create and session.resume. (Rust will land the same
shape in its API-review-fixes commit on this branch.)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f0fc862 commit f1b974e
4 files changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
| 755 | + | |
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
669 | 671 | | |
670 | 672 | | |
671 | 673 | | |
| |||
839 | 841 | | |
840 | 842 | | |
841 | 843 | | |
842 | | - | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
843 | 847 | | |
844 | 848 | | |
845 | 849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
830 | 830 | | |
831 | 831 | | |
832 | 832 | | |
833 | | - | |
| 833 | + | |
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
1496 | | - | |
1497 | | - | |
| 1496 | + | |
| 1497 | + | |
1498 | 1498 | | |
1499 | 1499 | | |
1500 | 1500 | | |
| |||
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | | - | |
1892 | | - | |
| 1891 | + | |
| 1892 | + | |
1893 | 1893 | | |
1894 | 1894 | | |
1895 | 1895 | | |
| |||
0 commit comments