Add example for random reactions
This commit is contained in:
parent
e89a5773d8
commit
05e479bb88
2 changed files with 27 additions and 0 deletions
25
samples/random-reaction.yaml
Normal file
25
samples/random-reaction.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
templates:
|
||||
random_reaction:
|
||||
type: m.reaction
|
||||
variables:
|
||||
react_to_event: '{{event.event_id}}'
|
||||
reaction: '{{ variables.reaction_choices | random }}'
|
||||
content:
|
||||
m.relates_to:
|
||||
rel_type: m.annotation
|
||||
event_id: $${react_to_event}
|
||||
key: $${reaction}
|
||||
|
||||
default_flags:
|
||||
- ignorecase
|
||||
|
||||
rules:
|
||||
random:
|
||||
matches:
|
||||
- hmm
|
||||
template: random_reaction
|
||||
variables:
|
||||
reaction_choices:
|
||||
- 🤔
|
||||
- 🧐
|
||||
- 🤨
|
Loading…
Add table
Add a link
Reference in a new issue