mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-01 16:00:51 +02:00
minor refactor ifs.
This commit is contained in:
parent
7c64e6068a
commit
f136a31b03
2 changed files with 5 additions and 24 deletions
|
@ -13,12 +13,7 @@ func (h *MessageHandlerCtx) boradcastCreate(session types.Session, payload *mess
|
|||
}
|
||||
|
||||
h.capture.StartBroadcast(payload.URL)
|
||||
|
||||
if err := h.boradcastStatus(session); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return h.boradcastStatus(session)
|
||||
}
|
||||
|
||||
func (h *MessageHandlerCtx) boradcastDestroy(session types.Session) error {
|
||||
|
@ -28,12 +23,7 @@ func (h *MessageHandlerCtx) boradcastDestroy(session types.Session) error {
|
|||
}
|
||||
|
||||
h.capture.StopBroadcast()
|
||||
|
||||
if err := h.boradcastStatus(session); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return h.boradcastStatus(session)
|
||||
}
|
||||
|
||||
func (h *MessageHandlerCtx) boradcastStatus(session types.Session) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue