feature(elm): Add notification on player joining the room #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
I put the 'blocked' label as we're still waiting for a tool that would let us display notifications in an elegant manner (by elegant I mean different than Debug.log).
There are two different types of messages depending on whether you join the channel or someone else. To make sure if it's you or someone else I compare values of currentUser.name and the name of user who has just joined.
Of course it's not the proper way to do it, it will be faulty as soon as we get two users with the same nicknames in the same room. (or maybe nicknames should be unique?). Anyway I prefer that a better way to identify players would be by using their encoded ids (see: #56).
Related issues
closes: #30
Test plan
Join a single room with two users and watch the notifications written to the log.