-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] AllowedReaction code #9518
[Fix] AllowedReaction code #9518
Conversation
@@ -81,6 +81,9 @@ func NewFuncMap() []template.FuncMap { | |||
"LoadTimes": func(startTime time.Time) string { | |||
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" | |||
}, | |||
"AllowedReactions": func() []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Maybe if we're going to do this we should just allow templates to query setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be a solution ... but then we can refactor a lot :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree that we could just name function "Settings" and use it here and later in other places where needed
@zeripath #9518 (comment) is in this case a general discusion ... but this PR fixes a bug (wich I'm searching for the issue Nr right now) |
Codecov Report
@@ Coverage Diff @@
## master #9518 +/- ##
==========================================
- Coverage 41.61% 41.59% -0.03%
==========================================
Files 573 573
Lines 75673 75674 +1
==========================================
- Hits 31493 31478 -15
- Misses 40270 40287 +17
+ Partials 3910 3909 -1
Continue to review full report at Codecov.
|
fix/optimize code from #8886
before: AllowedReaction was piped throu multible templates in the worst case
now: just exec func AllowedReaction
Fix:
if you change reactions you are not able anymore to add it by this UI element: