🐛 Fix edit message did not has the related event id
This commit is contained in:
parent
3d1c7e1bda
commit
3000b9d1a3
@ -21,14 +21,15 @@ 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,
|
||||
ChannelID: event.ChannelID,
|
||||
SenderID: event.SenderID,
|
||||
Uuid: uuid.NewString(),
|
||||
Body: EncodeMessageBody(body),
|
||||
Type: models.EventMessageEdit,
|
||||
Channel: event.Channel,
|
||||
Sender: event.Sender,
|
||||
QuoteEventID: body.QuoteEventID,
|
||||
RelatedEventID: &event.ID,
|
||||
ChannelID: event.ChannelID,
|
||||
SenderID: event.SenderID,
|
||||
})
|
||||
if err != nil {
|
||||
return event, err
|
||||
|
Loading…
Reference in New Issue
Block a user