🗃️ Add relations between quoted event and original event

This commit is contained in:
2024-11-18 22:56:10 +08:00
parent a79995e7c0
commit 6c60e250e1
3 changed files with 29 additions and 25 deletions

View File

@ -57,13 +57,14 @@ func newMessageEvent(c *fiber.Ctx) error {
_ = jsoniter.Unmarshal(raw, &parsed)
event := models.Event{
Uuid: data.Uuid,
Body: parsed,
Type: data.Type,
Sender: member,
Channel: channel,
ChannelID: channel.ID,
SenderID: member.ID,
Uuid: data.Uuid,
Body: parsed,
Type: data.Type,
Sender: member,
Channel: channel,
QuoteEventID: data.Body.QuoteEventID,
ChannelID: channel.ID,
SenderID: member.ID,
}
if event, err = services.NewEvent(event); err != nil {