mirror of
https://github.com/System-End/plura.git
synced 2026-04-19 16:28:21 +00:00
fix: fix triggers prefix/suffix
This commit is contained in:
parent
9c0b51db2b
commit
dcf078f3fa
1 changed files with 3 additions and 2 deletions
|
|
@ -196,6 +196,7 @@ impl System {
|
|||
db: &SqlitePool,
|
||||
message: &str,
|
||||
) -> Result<Option<TriggeredMember>, sqlx::Error> {
|
||||
debug!(message, "Fetching triggered member");
|
||||
sqlx::query_as!(
|
||||
TriggeredMember,
|
||||
r#"
|
||||
|
|
@ -211,8 +212,8 @@ impl System {
|
|||
triggers ON members.id = triggers.member_id
|
||||
WHERE
|
||||
-- See trigger.rs file for all types and names
|
||||
(triggers.typ = 0 AND ?1 LIKE triggers.text || '%') OR
|
||||
(triggers.typ = 1 AND ?1 LIKE '%' || triggers.text)
|
||||
(triggers.typ = 0 AND $1 LIKE '%' || triggers.text) OR
|
||||
(triggers.typ = 1 AND $1 LIKE triggers.text || '%')
|
||||
"#,
|
||||
message
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue