mirror of
https://github.com/mautrix/signal.git
synced 2025-03-14 14:15:36 +00:00
client: enable registering apns pushers
This commit is contained in:
parent
9e7a24a7ba
commit
d7c598dbf4
1 changed files with 6 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue