From fb9482c303a3f53c2f16eb41a8614f2d4302a9e3 Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Tue, 19 Jun 2018 10:54:41 -0700 Subject: remove the token check for topic subscription/unsubscription (#1422) --- Firebase/Messaging/FIRMessaging.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Firebase/Messaging') diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m index 3c4d999..a97374b 100644 --- a/Firebase/Messaging/FIRMessaging.m +++ b/Firebase/Messaging/FIRMessaging.m @@ -695,7 +695,7 @@ NSString *const kFIRMessagingPlistAutoInitEnabled = - (void)subscribeToTopic:(NSString *)topic completion:(nullable FIRMessagingTopicOperationCompletion)completion { - if (self.defaultFcmToken.length && topic.length) { + if (topic.length) { NSString *normalizeTopic = [[self class ] normalizeTopic:topic]; if ([FIRMessagingPubSub hasTopicsPrefix:topic]) { FIRMessagingLoggerWarn(kFIRMessagingMessageCodeTopicFormatIsDeprecated, @@ -721,7 +721,7 @@ NSString *const kFIRMessagingPlistAutoInitEnabled = - (void)unsubscribeFromTopic:(NSString *)topic completion:(nullable FIRMessagingTopicOperationCompletion)completion { - if (self.defaultFcmToken.length && topic.length) { + if (topic.length) { NSString *normalizeTopic = [[self class] normalizeTopic:topic]; if ([FIRMessagingPubSub hasTopicsPrefix:topic]) { FIRMessagingLoggerWarn(kFIRMessagingMessageCodeTopicFormatIsDeprecated, -- cgit v1.2.3