client: enable registering apns pushers

This commit is contained in:
Tulir Asokan 2025-03-07 17:20:20 +02:00
parent 9e7a24a7ba
commit d7c598dbf4

View file

@ -76,10 +76,14 @@ func (s *SignalClient) RegisterPushNotifications(ctx context.Context, pushType b
if s.Client == nil {
return bridgev2.ErrNotLoggedIn
}
if pushType != bridgev2.PushTypeFCM {
switch pushType {
case bridgev2.PushTypeFCM:
return s.Client.RegisterFCM(ctx, token)
case bridgev2.PushTypeAPNs:
return s.Client.RegisterAPNs(ctx, token)
default:
return fmt.Errorf("unsupported push type: %s", pushType)
}
return s.Client.RegisterFCM(ctx, token)
}
func (s *SignalClient) LogoutRemote(ctx context.Context) {