Fill event values with matched command stuff

This commit is contained in:
Tulir Asokan 2018-06-20 23:28:01 +03:00
parent 4536fcfe62
commit ad5e2ef72f
3 changed files with 75 additions and 9 deletions

View file

@ -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"`
}