Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
d3027a2b
Commit
d3027a2b
authored
2 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
improved variable names
parent
8730b939
No related branches found
Branches containing commit
No related tags found
Tags containing commit
5 merge requests
!510
Release
,
!419
rewrote the health tracker to both consider if there are waiting rounds and...
,
!371
[Channel RSAtoPrivate] Implement Reverse Asymmetric in Client/Broadcast
,
!354
Channels impl
,
!340
Project/channels
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
channels/emoji.go
+2
-2
2 additions, 2 deletions
channels/emoji.go
with
2 additions
and
2 deletions
channels/emoji.go
+
2
−
2
View file @
d3027a2b
...
...
@@ -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
compiled
Regex
=
regexp
.
MustCompile
(
findEmoji
)
var
compiled
FindEmoji
=
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
!
compiled
Regex
.
MatchReader
(
reader
)
{
if
!
compiled
FindEmoji
.
MatchReader
(
reader
)
{
return
InvalidReaction
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment