Start using JSONB column instead of app side compressed data (#4574)

This commit is contained in:
Nicolas Dorier
2023-02-21 15:06:34 +09:00
committed by GitHub
parent 5c61de3ae9
commit 2bd8227e20
61 changed files with 669 additions and 300 deletions

View File

@@ -154,15 +154,15 @@ namespace BTCPayServer.Services.Notifications
var handler = GetHandler(data.NotificationType);
if (handler is null)
return null;
var notification = JsonConvert.DeserializeObject(ZipUtils.Unzip(data.Blob), handler.NotificationBlobType);
var obj = new NotificationViewModel
{
Id = data.Id,
Type = data.NotificationType,
Created = data.Created,
Seen = data.Seen
};
handler.FillViewModel(notification, obj);
var notification = data.HasTypedBlob(handler.NotificationBlobType).GetBlob();
var obj = new NotificationViewModel
{
Id = data.Id,
Type = data.NotificationType,
Created = data.Created,
Seen = data.Seen
};
handler.FillViewModel(notification, obj);
return obj;
}