1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Add a basic tooltip showing who reacted

This adds a first attempt at tooltip showing who reacted to a message. It
doesn't limit senders or position the tooltip nicely, but the info is there at
least.

Part of https://github.com/vector-im/riot-web/issues/9722
This commit is contained in:
J. Ryan Stinnett
2019-05-17 11:52:03 +01:00
parent 32c68feae2
commit 3da1f73ea4
9 changed files with 180 additions and 3 deletions

View File

@@ -107,6 +107,17 @@ function unicodeToImage(str, addAlt) {
return str;
}
/**
* Returns the shortcode for an emoji character.
*
* @param {String} char The emoji character
* @return {String} The shortcode (such as :thumbup:)
*/
export function unicodeToShort(char) {
const unicode = emojione.jsEscapeMap[char];
return emojione.mapUnicodeToShort()[unicode];
}
/**
* Given one or more unicode characters (represented by unicode
* character number), return an image node with the corresponding