🐛 Fix message attachment didn't marked
This commit is contained in:
parent
7294aa3e43
commit
9014f59a2c
@ -87,6 +87,13 @@ func NewEvent(event models.Event) (models.Event, error) {
|
||||
return event, nil
|
||||
}
|
||||
|
||||
if val, ok := event.Body["attachments"].([]string); ok && len(val) > 0 {
|
||||
filekit.CountAttachmentUsage(gap.Nx, &proto.UpdateUsageRequest{
|
||||
Rid: val,
|
||||
Delta: 1,
|
||||
})
|
||||
}
|
||||
|
||||
event, err := GetEvent(event.ChannelID, event.ID)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to fetch event, the notifying of new event was terminated...")
|
||||
@ -117,12 +124,6 @@ func NewEvent(event models.Event) (models.Event, error) {
|
||||
go NotifyMessageEvent(members, event)
|
||||
}
|
||||
|
||||
if val, ok := event.Body["attachments"].([]string); ok && len(val) > 0 {
|
||||
filekit.CountAttachmentUsage(gap.Nx, &proto.UpdateUsageRequest{
|
||||
Rid: val,
|
||||
})
|
||||
}
|
||||
|
||||
return event, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user