🐛 Should not update the related event id to editing to message

This commit is contained in:
LittleSheep 2024-11-18 23:49:50 +08:00
parent c642f5ee44
commit 95d1284e68

View File

@ -21,15 +21,14 @@ func EditMessage(event models.Event, body models.EventMessageBody) (models.Event
} }
body.RelatedEventID = &event.ID body.RelatedEventID = &event.ID
_, err = NewEvent(models.Event{ _, err = NewEvent(models.Event{
Uuid: uuid.NewString(), Uuid: uuid.NewString(),
Body: EncodeMessageBody(body), Body: EncodeMessageBody(body),
Type: models.EventMessageEdit, Type: models.EventMessageEdit,
Channel: event.Channel, Channel: event.Channel,
Sender: event.Sender, Sender: event.Sender,
QuoteEventID: body.QuoteEventID, QuoteEventID: body.QuoteEventID,
RelatedEventID: body.RelatedEventID, ChannelID: event.ChannelID,
ChannelID: event.ChannelID, SenderID: event.SenderID,
SenderID: event.SenderID,
}) })
if err != nil { if err != nil {
return event, err return event, err