Skip to content
Snippets Groups Projects
Commit d3027a2b authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

improved variable names

parent 8730b939
No related branches found
No related tags found
5 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!371[Channel RSAtoPrivate] Implement Reverse Asymmetric in Client/Broadcast,!354Channels impl,!340Project/channels
......@@ -15,7 +15,7 @@ import (
//based on emojis found at https://unicode.org/emoji/charts/full-emoji-list.html
const findEmoji = `[\xA9\xAE\x{2000}-\x{3300}\x{1F000}-\x{1FBFF}]`
var compiledRegex = regexp.MustCompile(findEmoji)
var compiledFindEmoji = regexp.MustCompile(findEmoji)
// ValidateReaction checks that the reaction only contains a single emoji.
func ValidateReaction(reaction string) error {
......@@ -29,7 +29,7 @@ func ValidateReaction(reaction string) error {
reader := bytes.NewReader([]byte(reaction))
// make sure it has emojis
if !compiledRegex.MatchReader(reader) {
if !compiledFindEmoji.MatchReader(reader) {
return InvalidReaction
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment