From 95d1284e6865139ec14247511c79aaed1bbe5263 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 18 Nov 2024 23:49:50 +0800 Subject: [PATCH] :bug: Should not update the related event id to editing to message --- pkg/internal/services/messages.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkg/internal/services/messages.go b/pkg/internal/services/messages.go index cd49a1d..57d82c9 100644 --- a/pkg/internal/services/messages.go +++ b/pkg/internal/services/messages.go @@ -21,15 +21,14 @@ func EditMessage(event models.Event, body models.EventMessageBody) (models.Event } body.RelatedEventID = &event.ID _, err = NewEvent(models.Event{ - Uuid: uuid.NewString(), - Body: EncodeMessageBody(body), - Type: models.EventMessageEdit, - Channel: event.Channel, - Sender: event.Sender, - QuoteEventID: body.QuoteEventID, - RelatedEventID: body.RelatedEventID, - ChannelID: event.ChannelID, - SenderID: event.SenderID, + Uuid: uuid.NewString(), + Body: EncodeMessageBody(body), + Type: models.EventMessageEdit, + Channel: event.Channel, + Sender: event.Sender, + QuoteEventID: body.QuoteEventID, + ChannelID: event.ChannelID, + SenderID: event.SenderID, }) if err != nil { return event, err