Skip to content

Commit ece7c4c

Browse files
fix dial event dispatching to all active channels (#135)
1 parent 3afe70c commit ece7c4c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

events.go

+8-2
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,15 @@ func (evt *DeviceStateChanged) Keys() (sx Keys) {
352352

353353
// Keys returns the list of keys associated with this event
354354
func (evt *Dial) Keys() (sx Keys) {
355-
sx = append(sx, evt.Key(ChannelKey, evt.Caller.ID))
355+
if evt.Caller.ID != "" {
356+
sx = append(sx, evt.Key(ChannelKey, evt.Caller.ID))
357+
}
358+
356359
sx = append(sx, evt.Key(ChannelKey, evt.Peer.ID))
357-
sx = append(sx, evt.Key(ChannelKey, evt.Forwarded.ID))
360+
361+
if evt.Forwarded.ID != "" {
362+
sx = append(sx, evt.Key(ChannelKey, evt.Forwarded.ID))
363+
}
358364

359365
return
360366
}

0 commit comments

Comments
 (0)