mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-02 11:30:35 +02:00
Do not set m.Expires if cache: no
is set
This commit is contained in:
parent
85fc16b016
commit
96439ac41f
4 changed files with 8 additions and 3 deletions
server
|
@ -589,7 +589,9 @@ func (s *Server) handlePublishWithoutResponse(r *http.Request, v *visitor) (*mes
|
|||
}
|
||||
m.Sender = v.IP()
|
||||
m.User = v.MaybeUserID()
|
||||
m.Expires = time.Unix(m.Time, 0).Add(v.Limits().MessageExpiryDuration).Unix()
|
||||
if cache {
|
||||
m.Expires = time.Unix(m.Time, 0).Add(v.Limits().MessageExpiryDuration).Unix()
|
||||
}
|
||||
if err := s.handlePublishBody(r, v, m, body, unifiedpush); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue