Skip to content

Commit 43a2306

Browse files
Try to attach a small image if a large image not provided.
1 parent 7752b6c commit 43a2306

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sdk/Notifo.SDK/NotifoMobilePush/NotifoMobilePushImplementation.ios.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ private async Task<UNMutableNotificationContent> EnrichNotificationContentAsync(
9393
content.Body = notification.Body;
9494
}
9595

96-
if (!string.IsNullOrWhiteSpace(notification.ImageLarge))
96+
string image = string.IsNullOrWhiteSpace(notification.ImageLarge) ? notification.ImageSmall : notification.ImageLarge;
97+
98+
if (!string.IsNullOrWhiteSpace(image))
9799
{
98-
var imagePath = await GetImageAsync(notification.ImageLarge);
100+
var imagePath = await GetImageAsync(image);
99101
if (!string.IsNullOrWhiteSpace(imagePath))
100102
{
101103
var uniqueName = $"{Guid.NewGuid()}{Path.GetExtension(imagePath)}";

0 commit comments

Comments
 (0)