ссылочки

This commit is contained in:
kislovdm
2026-03-10 16:44:36 +03:00
parent 9458942aeb
commit 0fb652664f
3 changed files with 10 additions and 1 deletions
@@ -73,6 +73,7 @@ public class PepperClient : IPepperClient
CreatedAt = dto.CreatedAt ?? DateTimeOffset.FromUnixTimeMilliseconds(dto.CreatedAtInMillis).UtcDateTime,
CreatedAtInMillis = dto.CreatedAtInMillis,
DealUrl = dto.DealUrl ?? string.Empty,
Permalink = dto.Permalink ?? string.Empty,
StoreName = dto.Store?.Name ?? string.Empty,
StorePermalink = dto.Store?.Permalink ?? string.Empty
};
@@ -110,6 +111,9 @@ public class PepperClient : IPepperClient
[JsonPropertyName("deal_url")]
public string? DealUrl { get; set; }
[JsonPropertyName("permalink")]
public string? Permalink { get; set; }
[JsonPropertyName("store")]
public PepperStore? Store { get; set; }
}
@@ -281,7 +281,11 @@ public class TelegramNotifier : ITelegramNotifier
textBuilder.AppendLine($"Магазин: {deal.StoreName}");
textBuilder.AppendLine();
textBuilder.AppendLine($"Товар в магазине: {deal.DealUrl}");
textBuilder.AppendLine($"Открыть на Pepper.ru: https://www.pepper.ru/deals/{deal.StorePermalink}");
if (!string.IsNullOrEmpty(deal.Permalink))
{
textBuilder.AppendLine($"Открыть на Pepper.ru: https://www.pepper.ru/deals/{deal.Permalink}");
}
try
{