chore: refresh gramsrv public release

This commit is contained in:
A 2026-06-30 14:37:43 +08:00
parent 75cebe8dbf
commit 70b6820474
1274 changed files with 378751 additions and 59919 deletions

View file

@ -0,0 +1,30 @@
package rpc
import (
"testing"
"telesrv/internal/domain"
)
func TestRemoveKnownChannelRefs(t *testing.T) {
refs := map[int64]struct{}{
1001: {},
1002: {},
1003: {},
}
removeKnownChannelRefs(refs, []domain.Channel{
{ID: 1002},
{ID: 0},
{ID: 1004},
})
if _, ok := refs[1002]; ok {
t.Fatalf("known channel ref was not removed: %+v", refs)
}
for _, id := range []int64{1001, 1003} {
if _, ok := refs[id]; !ok {
t.Fatalf("unexpectedly removed channel %d from refs %+v", id, refs)
}
}
}