feat: release v0.2.0 profiles, chat, freeze, and bots

Ship the product pass on the v0.1.3 schema with additive migrations, a replica migration lock, and bot accounts kept out of people lists.
This commit is contained in:
ahp
2026-10-10 16:42:35 +03:30
parent 8586bbafcc
commit 22d92c133d
85 changed files with 10510 additions and 1341 deletions
@@ -0,0 +1,27 @@
package api
import (
"testing"
"time"
)
func TestGregorianToJalaliKnownDates(t *testing.T) {
cases := []struct {
y, m, d int
jy, jm, jd int
}{
{2026, 3, 21, 1405, 1, 1},
{2026, 10, 10, 1405, 7, 18},
{2024, 3, 20, 1403, 1, 1},
}
for _, c := range cases {
jy, jm, jd := gregorianToJalali(c.y, c.m, c.d)
if jy != c.jy || jm != c.jm || jd != c.jd {
t.Fatalf("%04d-%02d-%02d: got %d-%d-%d want %d-%d-%d", c.y, c.m, c.d, jy, jm, jd, c.jy, c.jm, c.jd)
}
}
stamp := formatJalaliStamp(time.Date(2026, 3, 21, 12, 0, 0, 0, time.UTC))
if stamp != "۱ فروردین · ۱۵:۳۰" {
t.Fatalf("stamp: %q", stamp)
}
}