diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d281db..1862b68 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ before_script: build: stage: build - image: mcr.microsoft.com/dotnet/sdk:8.0 + image: mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim script: - dotnet nuget add source https://pkgs.dev.azure.com/tgbots/Telegram.Bot/_packaging/release/nuget/v3/index.json -n Telegram.Bot - dotnet restore --no-cache diff --git a/Services/HandlePostAction.cs b/Services/HandlePostAction.cs index ebd438a..8836b31 100755 --- a/Services/HandlePostAction.cs +++ b/Services/HandlePostAction.cs @@ -59,7 +59,7 @@ namespace mstdnCats.Services , replyMarkup: new InlineKeyboardMarkup(InlineKeyboardButton.WithUrl("View on Mastodon", post.Url))); await _bot.AnswerCallbackQuery(callbackQuery.Id, "Media attachment approved and sent to channel."); - await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.MessageId); + await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.Id); logger?.LogTrace($"Media attachment {mediaId} approved."); @@ -84,7 +84,7 @@ namespace mstdnCats.Services if (post.MediaAttachments.Count == 1 && post.MediaAttachments.First().MediaId == mediaId) { await _bot.AnswerCallbackQuery(callbackQuery.Id, "Post has only one attachment. No deletion performed."); - await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.MessageId); + await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.Id); logger?.LogTrace($"Post {post.mstdnPostId} has only one attachment. No deletion performed."); } @@ -93,7 +93,7 @@ namespace mstdnCats.Services post.MediaAttachments.RemoveAll(m => m.MediaId == mediaId); await _db.UpdateOneAsync(p => p.mstdnPostId == post.mstdnPostId, post); await _bot.AnswerCallbackQuery(callbackQuery.Id, "Media attachment rejected."); - await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.MessageId); + await _bot.DeleteMessage(callbackQuery.Message.Chat.Id, callbackQuery.Message.Id); logger?.LogTrace($"Media attachment {mediaId} removed from post {post.mstdnPostId}."); } diff --git a/mstdnCats.csproj b/mstdnCats.csproj index 2b7e990..b288de2 100755 --- a/mstdnCats.csproj +++ b/mstdnCats.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable enable true