Add example to illustrate the continue_after_match
feature.
This commit is contained in:
parent
2e5d9424b9
commit
8180815b38
1 changed files with 44 additions and 0 deletions
44
samples/your-opinion.yaml
Normal file
44
samples/your-opinion.yaml
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
templates:
|
||||||
|
reaction:
|
||||||
|
type: m.reaction
|
||||||
|
variables:
|
||||||
|
react_to_event: '{{event.content.get_reply_to() or event.event_id}}'
|
||||||
|
content:
|
||||||
|
m.relates_to:
|
||||||
|
rel_type: m.annotation
|
||||||
|
event_id: $${react_to_event}
|
||||||
|
key: $${reaction}
|
||||||
|
|
||||||
|
|
||||||
|
default_flags:
|
||||||
|
- ignorecase
|
||||||
|
antispam:
|
||||||
|
room:
|
||||||
|
max: 60
|
||||||
|
delay: 60
|
||||||
|
user:
|
||||||
|
max: 60
|
||||||
|
delay: 60
|
||||||
|
|
||||||
|
rules:
|
||||||
|
opinon_up:
|
||||||
|
raw: false
|
||||||
|
matches: '#youropinion\b(?!`)'
|
||||||
|
template: reaction
|
||||||
|
continue_after_match: true
|
||||||
|
variables:
|
||||||
|
reaction: 👍
|
||||||
|
opinion_down:
|
||||||
|
raw: false
|
||||||
|
matches: '#youropinion\b(?!`)'
|
||||||
|
template: reaction
|
||||||
|
continue_after_match: true
|
||||||
|
variables:
|
||||||
|
reaction: 👎
|
||||||
|
opinon_shrug:
|
||||||
|
raw: false
|
||||||
|
matches: '#youropinion\b(?!`)'
|
||||||
|
template: reaction
|
||||||
|
variables:
|
||||||
|
reaction: 🤷
|
||||||
|
|
Loading…
Reference in a new issue