(new): support Bot API 10.3
Golang lint / lint (push) Failing after 1m37s

(fix): finalize v2 contracts
(tests): cover v2 migration
(doc): prepare release guidance
This commit is contained in:
2026-09-08 23:21:38 +03:00
parent 24040fe164
commit d78526242b
88 changed files with 2321 additions and 918 deletions
+15 -3
View File
@@ -9,7 +9,7 @@ import (
"testing"
"time"
"git.scuroneko.dev/scuroneko/laniakea/tgapi"
"git.scuroneko.dev/scuroneko/laniakea/v2/tgapi"
"git.scuroneko.dev/scuroneko/sneklog/v2"
)
@@ -317,7 +317,7 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
name: "poll answer",
update: &tgapi.Update{
Type: tgapi.UpdateTypePollAnswer,
PollAnswer: &tgapi.PollAnswer{User: tgapi.User{ID: 115}},
PollAnswer: &tgapi.PollAnswer{User: &tgapi.User{ID: 115}},
},
wantFrom: true,
wantFromID: 115,
@@ -326,7 +326,7 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
name: "anonymous poll answer",
update: &tgapi.Update{
Type: tgapi.UpdateTypePollAnswer,
PollAnswer: &tgapi.PollAnswer{VoterChat: tgapi.Chat{ID: -2007}},
PollAnswer: &tgapi.PollAnswer{VoterChat: &tgapi.Chat{ID: -2007}},
},
wantChat: true,
wantChatID: -2007,
@@ -428,6 +428,18 @@ func TestPrepareUpdateCtxContract(t *testing.T) {
wantFrom: true,
wantFromID: 121,
},
{
name: "stopped message generation",
update: &tgapi.Update{
Type: tgapi.UpdateTypeMessageGenerationStopped,
StoppedMessageGeneration: &tgapi.MessageGenerationStopped{
Chat: tgapi.Chat{ID: -2012},
DraftID: 7,
},
},
wantChat: true,
wantChatID: -2012,
},
{
name: "giveaway chat boost has no user",
update: &tgapi.Update{