v0.5.1: bubble for Android 0.5.1 — no double sends when a text with an emoji is cut off mid-send

voip.ms's listing drops emoji, so a send whose reply was lost (here the
laptop slept 8 s after Send) never matched its own copy in the listing and
went out a second time. Match with the emoji taken out (exact match first),
and after an uncertain send only send again once a listing check actually
got through; if none can, mark it failed with a note instead.
This commit is contained in:
2026-11-07 14:05:23 -08:00
parent 96c368dfd1
commit 2e2086e178
12 changed files with 132 additions and 29 deletions
+11
View File
@@ -239,6 +239,17 @@ describe('MessageDb', () => {
expect(db.getMessage(t)?.status).toBe('failed')
})
it("matches a copy that came back without its emoji, but prefers an exact one", () => {
const t = pending('see you tonight ❤️', 10 * MIN)
db.markFailed(t, 'interrupted')
expect(poll(msg(700, 'a', 'see you tonight ', 10 * MIN + 17_000, 'out'))).toEqual([t])
const t1 = pending('ok 👍🏽', 20 * MIN)
const t2 = pending('ok', 20 * MIN + 1)
expect(poll(msg(701, 'a', 'ok', 20 * MIN + 2000, 'out'))).toEqual([t2])
expect(db.getMessage(t1)?.status).toBe('pending')
expect(poll(msg(702, 'a', 'not ok', 20 * MIN + 3000, 'out'))).toEqual([])
})
it('matches identical texts one to one, oldest first', () => {
const t1 = pending('ok', 10 * MIN)
const t2 = pending('ok', 10 * MIN + 1)