Repository navigation
Take keycap emoji such as 1️⃣ as Tiny reactions. - #233
Open
LarsenClose wants to merge 1 commit into
Open
LarsenClose wants to merge 1 commit into
LarsenClose wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed and why
Picking a keycap emoji such as 1️⃣ as a Tiny reaction said "That reaction isn't allowed here.", and a keycap someone else had put on a message was dropped.
unicode_emojirefused any reaction with an ASCII letter or digit in it, and a keycap starts with one (1, U+FE0F, U+20E3). tinyserver takes keycaps:one_emoji("1️⃣")is in its tests.unicode_emojinow lets a digit through when the keycap mark U+20E3 follows it, with or without U+FE0F between. A bare digit, a word, a shortcode and a path are still refused.Type
Platforms
Proof
Scenario:
e2e/scenarios/keycap-reaction.TINYCLIENT_PROVE=keycap-reactionruns the filter the Tiny adapter applies to reactions it sends and receives. It exits 0 only when 1️⃣, 0⃣ and #️⃣ pass and1,10️⃣,1with U+FE0F, and:one:do not. A build without the fix ignores the variable and keeps serving, so the driver fails there.a_keycap_is_a_reaction_and_a_bare_digit_is_notLocal runs, Linux:
mainat its first assertion,unicode_emoji("1\u{FE0F}\u{20E3}"), and passes here.chatdfrom this branch printedprove-exit:0and passed in 0.1 s. Against one frommainit kept serving and failed at the 45 s timeout.cargo test -p chatd --lib: 502 passed, 10 ignored, 1 failed. The failure isplain_http_off_the_persons_network_is_asked_about_before_anything_is_sent, which fails the same way onmainon that machine: its outbound proxy answers for the address the test expects to be unreachable. I did not runcargo test --workspace; the change is only in chatd.Lab run: none.
Compatibility
No protocol change. An older client still refuses keycaps; the server already takes them.
Risk and rollback
Low. Only a digit directly before U+20E3 is let through. Revert the PR to refuse keycaps again.
Release note
Keycap emoji such as 1️⃣ work as Tiny reactions.