Attachment size limit
This commit is contained in:
@@ -14,7 +14,7 @@ const (
|
||||
DefaultMinDelay = 10 * time.Second
|
||||
DefaultMaxDelay = 3 * 24 * time.Hour
|
||||
DefaultMessageLimit = 4096 // Bytes
|
||||
DefaultAttachmentSizeLimit = 15 * 1024 * 1024
|
||||
DefaultAttachmentSizeLimit = int64(15 * 1024 * 1024)
|
||||
DefaultAttachmentSizePreviewMax = 20 * 1024 * 1024 // Bytes
|
||||
DefaultAttachmentExpiryDuration = 3 * time.Hour
|
||||
DefaultFirebaseKeepaliveInterval = 3 * time.Hour // Not too frequently to save battery
|
||||
|
||||
@@ -32,10 +32,10 @@ type message struct {
|
||||
|
||||
type attachment struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Size int64 `json:"size"`
|
||||
Expires int64 `json:"expires"`
|
||||
PreviewURL string `json:"preview_url"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Size int64 `json:"size,omitempty"`
|
||||
Expires int64 `json:"expires,omitempty"`
|
||||
PreviewURL string `json:"preview_url,omitempty"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user