mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
Add changelog and fix condition not matching globs on body
Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
This commit is contained in:
parent
9df8009ae3
commit
48fc634825
2 changed files with 3 additions and 1 deletions
1
changelog.d/6457.bugfix
Normal file
1
changelog.d/6457.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix that replies to @roomba would be highlighted as a room ping. Contributed by Nico.
|
|
@ -56,7 +56,8 @@ class EventMatchCondition(
|
|||
// word boundary.
|
||||
return try {
|
||||
if (key == 'content.body') {
|
||||
value.caseInsensitiveFind(pattern)
|
||||
val regex = Regex("(\\W|^)"+pattern.simpleGlobToRegExp() + "(\\W|$)", setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE))
|
||||
regex.containsMatchIn(value)
|
||||
} else {
|
||||
val regex = Regex(pattern.simpleGlobToRegExp(), setOf(RegexOption.DOT_MATCHES_ALL, RegexOption.IGNORE_CASE))
|
||||
regex.matches(value)
|
||||
|
|
Loading…
Add table
Reference in a new issue