Fix Rust Chat App Tutorial not showing messages of other users live#4588
Fix Rust Chat App Tutorial not showing messages of other users live#4588OMGeeky wants to merge 3 commits intoclockworklabs:masterfrom
Conversation
Signed-off-by: Frederik <39029799+OMGeeky@users.noreply.github.com>
Signed-off-by: Frederik <39029799+OMGeeky@users.noreply.github.com>
gefjon
left a comment
There was a problem hiding this comment.
D'oh! I fixed this in the template (templates/chat-console-rs/src/main.rs), but forgot to update the tutorial.
In the template I used !matches!(ctx.event, Event::SubscribeApplied). Do you think that's more or less clear than your matches!(ctx.event, Event::Reducer(_) | Event::Transaction)? Personally I think excluding SubscribeApplied makes more sense than including the other two, but the !matches! looks pretty gnarly in Rust syntax.
I'm relatively new to to spacetime-db but in my opinion I think it should be the explicit inclusion of And yeah, |
This all works for me. Could you update the template code in |
Signed-off-by: Frederik <39029799+OMGeeky@users.noreply.github.com>
|
Thanks for the quick approval @gefjon. Anything I need to do about the one failing CI-Check? |
Description of Changes
This fixes an Issue in the Rust Chat App Tutorial, that is caused by the Event Type Changes in 2.0
This resulted in other clients not receiving new messages, since they are now Event::Transaction and no longer included within the Event::Reducer
API and ABI breaking changes
I don't think any? I only changed a tutorial, the real change was in 2.0
Expected complexity level and risk
1
Testing
There might be more places where this is an Issue, I just noticed this one while following the Tutorial.