🐛 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
|
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,
|
||||||
ChannelID: event.ChannelID,
|
RelatedEventID: &event.ID,
|
||||||
SenderID: event.SenderID,
|
ChannelID: event.ChannelID,
|
||||||
|
SenderID: event.SenderID,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return event, err
|
return event, err
|
||||||
|
Loading…
Reference in New Issue
Block a user