diff --git a/internal/gateway/methods/pairing.go b/internal/gateway/methods/pairing.go index 85f6bbb6..9b1b3e44 100644 --- a/internal/gateway/methods/pairing.go +++ b/internal/gateway/methods/pairing.go @@ -11,8 +11,9 @@ import ( ) // PairingApproveCallback is called after a pairing is approved. -// channel is the channel name (e.g., "telegram"), chatID is the chat to notify. -type PairingApproveCallback func(ctx context.Context, channel, chatID string) +// channel is the channel name (e.g., "telegram"), chatID is the chat to notify, +// senderID identifies the paired entity (e.g., "group:XXXX" for group pairings). +type PairingApproveCallback func(ctx context.Context, channel, chatID, senderID string) // PairingMethods handles device.pair.request, device.pair.approve, device.pair.list, device.pair.revoke. type PairingMethods struct { @@ -102,7 +103,7 @@ func (m *PairingMethods) handleApprove(ctx context.Context, client *gateway.Clie // Notify the user via channel (matching TS notifyPairingApproved). // Use Background context: the CLI client may disconnect before the notification is sent. if m.onApprove != nil && paired != nil { - go m.onApprove(context.Background(), paired.Channel, paired.ChatID) + go m.onApprove(context.Background(), paired.Channel, paired.ChatID, paired.SenderID) } if m.broadcaster != nil {