Skip to content

Commit 6f08df3

Browse files
author
Rodrigo Gomez Palacio
committed
Bugfix: should not be sending retry-count = 0 on first attempt
Motivation: bring into parity with Android
1 parent 6c497f2 commit 6f08df3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

iOS_SDK/OneSignalSDK/OneSignalInAppMessages/Requests/OSInAppMessagingRequests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ + (instancetype _Nonnull) withSubscriptionId:(NSString * _Nonnull)subscription
4343
headers[@"OneSignal-Session-Duration" ] = [sessionDuration stringValue];
4444
}
4545
headers[@"OneSignal-RYW-Token"] = rywToken;
46-
headers[@"OneSignal-Retry-Count"] = [retryCount stringValue];
47-
46+
if ([retryCount intValue] > 0) {
47+
headers[@"OneSignal-Retry-Count"] = [retryCount stringValue];
48+
}
49+
4850
request.additionalHeaders = headers;
4951

5052
NSString *appId = [OneSignalConfigManager getAppId];

0 commit comments

Comments
 (0)