From 9402d0d2911b12b699294813f05b420527ba05da Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 18 Feb 2024 23:10:31 +0200 Subject: [PATCH] Fix mass inserting messages --- database/message.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/message.go b/database/message.go index bd2fede..c38483c 100644 --- a/database/message.go +++ b/database/message.go @@ -107,7 +107,7 @@ func (mq *MessageQuery) MassInsert(key PortalKey, msgs []Message) { params[0] = key.ChannelID params[1] = key.Receiver for i, msg := range msgs { - baseIndex := 2 + i*7 + baseIndex := 2 + i*8 params[baseIndex] = msg.DiscordID params[baseIndex+1] = msg.AttachmentID params[baseIndex+2] = msg.SenderID