Commit d409eb8
authored
feat: add support for ephemeral channels (#3301)
## 🎯 Goal
This PR provides a variety of fixes in our Chat SDK that made it either
impossible (or too difficult to do without hacks) for us to send a
message in an ephemeral channel. At a certain point, this should be
abstracted away in a more sophisticated fashion however it'll have to do
for now.
It also adds 2 new properties on the `Channel` component that can be
used as utilities for this usecase.
## 🛠 Implementation details
<!-- Provide a description of the implementation -->
## 🎨 UI Changes
<!-- Add relevant screenshots -->
<details>
<summary>iOS</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
<details>
<summary>Android</summary>
<table>
<thead>
<tr>
<td>Before</td>
<td>After</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<!--<img src="" /> -->
</td>
<td>
<!--<img src="" /> -->
</td>
</tr>
</tbody>
</table>
</details>
## 🧪 Testing
<!-- Explain how this change can be tested (or why it can't be tested)
-->
## ☑️ Checklist
- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [ ] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
- [ ] SampleApp iOS and Android
- [ ] Expo iOS and Android1 parent 3e21355 commit d409eb8
File tree
7 files changed
+110
-40
lines changed- package/src
- components
- Channel
- hooks
- MessageList
- contexts/messageInputContext
- store
7 files changed
+110
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
433 | 432 | | |
434 | 433 | | |
435 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
436 | 449 | | |
437 | 450 | | |
438 | 451 | | |
| |||
492 | 505 | | |
493 | 506 | | |
494 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
495 | 519 | | |
496 | 520 | | |
497 | 521 | | |
498 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
499 | 526 | | |
500 | 527 | | |
501 | 528 | | |
| |||
567 | 594 | | |
568 | 595 | | |
569 | 596 | | |
| 597 | + | |
570 | 598 | | |
571 | 599 | | |
572 | 600 | | |
573 | 601 | | |
| 602 | + | |
574 | 603 | | |
575 | 604 | | |
576 | 605 | | |
| |||
715 | 744 | | |
716 | 745 | | |
717 | 746 | | |
| 747 | + | |
718 | 748 | | |
719 | 749 | | |
720 | 750 | | |
| |||
881 | 911 | | |
882 | 912 | | |
883 | 913 | | |
884 | | - | |
| 914 | + | |
885 | 915 | | |
886 | 916 | | |
887 | 917 | | |
| |||
915 | 945 | | |
916 | 946 | | |
917 | 947 | | |
918 | | - | |
| 948 | + | |
919 | 949 | | |
920 | 950 | | |
921 | 951 | | |
922 | 952 | | |
923 | 953 | | |
924 | 954 | | |
| 955 | + | |
925 | 956 | | |
926 | 957 | | |
927 | 958 | | |
| |||
1078 | 1109 | | |
1079 | 1110 | | |
1080 | 1111 | | |
1081 | | - | |
| 1112 | + | |
1082 | 1113 | | |
1083 | 1114 | | |
1084 | 1115 | | |
| |||
1099 | 1130 | | |
1100 | 1131 | | |
1101 | 1132 | | |
| 1133 | + | |
1102 | 1134 | | |
1103 | 1135 | | |
1104 | 1136 | | |
| |||
1300 | 1332 | | |
1301 | 1333 | | |
1302 | 1334 | | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1306 | 1342 | | |
1307 | 1343 | | |
1308 | 1344 | | |
| |||
1321 | 1357 | | |
1322 | 1358 | | |
1323 | 1359 | | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1327 | 1367 | | |
1328 | 1368 | | |
1329 | 1369 | | |
| |||
1344 | 1384 | | |
1345 | 1385 | | |
1346 | 1386 | | |
1347 | | - | |
| 1387 | + | |
1348 | 1388 | | |
1349 | 1389 | | |
1350 | 1390 | | |
| |||
1355 | 1395 | | |
1356 | 1396 | | |
1357 | 1397 | | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1363 | 1405 | | |
1364 | 1406 | | |
1365 | 1407 | | |
| |||
1397 | 1439 | | |
1398 | 1440 | | |
1399 | 1441 | | |
1400 | | - | |
1401 | | - | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1405 | 1450 | | |
1406 | 1451 | | |
1407 | 1452 | | |
| |||
1425 | 1470 | | |
1426 | 1471 | | |
1427 | 1472 | | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1437 | 1485 | | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1438 | 1489 | | |
1439 | 1490 | | |
1440 | 1491 | | |
| |||
1756 | 1807 | | |
1757 | 1808 | | |
1758 | 1809 | | |
| 1810 | + | |
1759 | 1811 | | |
1760 | 1812 | | |
1761 | 1813 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
132 | 140 | | |
133 | 141 | | |
134 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
784 | | - | |
| 784 | + | |
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
| |||
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
331 | 332 | | |
332 | 333 | | |
333 | 334 | | |
| |||
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
414 | | - | |
| 415 | + | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| |||
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
428 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
429 | 433 | | |
430 | 434 | | |
431 | 435 | | |
| |||
443 | 447 | | |
444 | 448 | | |
445 | 449 | | |
446 | | - | |
| 450 | + | |
447 | 451 | | |
448 | 452 | | |
449 | 453 | | |
| |||
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
455 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
456 | 465 | | |
457 | 466 | | |
458 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
| |||
0 commit comments