1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-10 23:14:25 +02:00

Docs docs docs

This commit is contained in:
Philipp Heckel 2022-01-13 15:17:30 -05:00
parent 762333c28f
commit 034c81288c
11 changed files with 346 additions and 141 deletions

View file

@ -131,7 +131,8 @@ func (c *memCache) AttachmentsSize(owner string) (int64, error) {
var size int64
for topic := range c.messages {
for _, m := range c.messages[topic] {
if m.Attachment != nil && m.Attachment.Owner == owner {
counted := m.Attachment != nil && m.Attachment.Owner == owner && m.Attachment.Expires > time.Now().Unix()
if counted {
size += m.Attachment.Size
}
}