🐛 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
_, 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