mirror of
https://github.com/maubot/maubot
synced 2025-08-29 17:50:38 +00:00
Use custom type for EventHandler output
This commit is contained in:
parent
feaf75b327
commit
944b384633
3 changed files with 15 additions and 12 deletions
|
@ -53,7 +53,13 @@ const (
|
|||
|
||||
const FormatHTML = "org.matrix.custom.html"
|
||||
|
||||
type EventHandler func(*Event) bool
|
||||
type EventHandler func(*Event) EventHandlerResult
|
||||
type EventHandlerResult bool
|
||||
|
||||
const (
|
||||
Continue EventHandlerResult = false
|
||||
StopPropagation EventHandlerResult = true
|
||||
)
|
||||
|
||||
type MatrixClient interface {
|
||||
AddEventHandler(EventType, EventHandler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue