Commit 3c79665
authored
fix: added call state update for handling case when call.ring event as not triggered (#2035)
### 💡 Overview
The case:
when creating a ring type call with `getOrCreate` method, ws
`call.created` event triggers first (for some reason `call.ring` is not
detected) –> it creates a call instance with `ringing` property set to
false and registers it in the state store. After that we handle response
in `getOrCreateMethod` which tries to register the call (at this point
with `ringing` set to true) which is skipped as the call was already
registered. So in this scenario `useCalls` doesn't return the ringing
call.
### 📝 Implementation notes
The fix adds register or update method, which will override call
properties inside `get` and `getOrCreate` methods, which fixes behavior
in the case described above.
🎫 Ticket:
https://linear.app/stream/issue/RN-315/create-ring-type-call-issue1 parent 1aa72c8 commit 3c79665
2 files changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
760 | | - | |
| 760 | + | |
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
| |||
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | | - | |
| 790 | + | |
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| |||
0 commit comments