Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Show mentions as profile names and treat them as indivisible elements #538
When a member is selected, we create a mapping from "handle" (usually their profile name) to their pubkey. If multiple members with the same profile names are selected, one of the conflicting handles is augmented with a corresponding shortened pubkey (we use as many characters from the pubkey as necessary to avoid ambiguity). Before a message is sent, all handles are replaced with their corresponding pubkeys, and the mapping is reset.
The input/compose GUI element now has custom handling of arrow, delete and backspace keys. In particular, we make sure that a mention is treated as a single indivisible element, so if any action would result in a caret being positioned inside a mention, it will be moved either to the end or the beginning of the mention (whichever is more natural). We don't, however, handle mouse cursor in any special way yet.