mirror of
https://github.com/maubot/maubot
synced 2025-08-29 19:00:39 +00:00
Fill event values with matched command stuff
This commit is contained in:
parent
4536fcfe62
commit
ad5e2ef72f
3 changed files with 75 additions and 9 deletions
10
matrix.go
10
matrix.go
|
@ -110,6 +110,8 @@ type Unsigned struct {
|
|||
PrevSender string `json:"prev_sender,omitempty"`
|
||||
ReplacesState string `json:"replaces_state,omitempty"`
|
||||
Age int64 `json:"age"`
|
||||
|
||||
PassiveCommand MatchedPassiveCommand `json:"m.passive_command,omitempty"`
|
||||
}
|
||||
|
||||
func (unsigned Unsigned) Equals(otherUnsigned *Unsigned) bool {
|
||||
|
@ -171,6 +173,14 @@ type MatchedCommand struct {
|
|||
Arguments map[string]string `json:"arguments"`
|
||||
}
|
||||
|
||||
type MatchedPassiveCommand struct {
|
||||
Matched string `json:"matched"`
|
||||
Values []string `json:"captured"`
|
||||
|
||||
BackCompatCommand string `json:"command"`
|
||||
BackCompatArguments map[string]string `json:"arguments"`
|
||||
}
|
||||
|
||||
type RelatesTo struct {
|
||||
InReplyTo InReplyTo `json:"m.in_reply_to,omitempty"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue