Skip to content

Commit

Permalink
fix dial event dispatching to all active channels (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
serfreeman1337 authored Oct 21, 2022
1 parent 3afe70c commit ece7c4c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,15 @@ func (evt *DeviceStateChanged) Keys() (sx Keys) {

// Keys returns the list of keys associated with this event
func (evt *Dial) Keys() (sx Keys) {
sx = append(sx, evt.Key(ChannelKey, evt.Caller.ID))
if evt.Caller.ID != "" {
sx = append(sx, evt.Key(ChannelKey, evt.Caller.ID))
}

sx = append(sx, evt.Key(ChannelKey, evt.Peer.ID))
sx = append(sx, evt.Key(ChannelKey, evt.Forwarded.ID))

if evt.Forwarded.ID != "" {
sx = append(sx, evt.Key(ChannelKey, evt.Forwarded.ID))
}

return
}
Expand Down

0 comments on commit ece7c4c

Please sign in to comment.