From 431122645087f9c848de8ec8ee6554c2fe40ffdb Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 10 Oct 2024 16:37:03 +0300 Subject: [PATCH] legacymigrate: fix split_part --- cmd/mautrix-whatsapp/legacymigrate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mautrix-whatsapp/legacymigrate.go b/cmd/mautrix-whatsapp/legacymigrate.go index e3d2eb69..34bcf64e 100644 --- a/cmd/mautrix-whatsapp/legacymigrate.go +++ b/cmd/mautrix-whatsapp/legacymigrate.go @@ -31,7 +31,7 @@ var legacyMigrateCopyData string func init() { litestream.Functions["split_part"] = func(input, delimiter string, partNum int) string { // split_part is 1-indexed - partNum++ + partNum-- parts := strings.Split(input, delimiter) if len(parts) <= partNum { return ""