image previews #413
No reviewers
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#413
Loading…
Reference in New Issue
No description provided.
Delete Branch "ipreview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
just requests for consts for usability elsewhere and clearer reading
otherwise this LGTM
@ -33,2 +36,4 @@
}
func PreviewFunctionalityGate(experimentMap map[string]bool) (*Functionality, error) {
if experimentMap["filesharing"] == true && experimentMap["filesharing-images"] == true {
"filesharing" and "filesharing-images" should be consts
@ -44,0 +58,4 @@
// checks file size and file name. *DOES NOT* check user settings or contact state
func (om *OverlayMessage) ShouldAutoDL() bool {
lname := strings.ToLower(om.Name)
return om.Size <= 20971520 && (strings.HasSuffix(lname, "jpg") || strings.HasSuffix(lname, "jpeg") || strings.HasSuffix(lname, "png") || strings.HasSuffix(lname, "gif") || strings.HasSuffix(lname, "webp") || strings.HasSuffix(lname, "bmp"))
20971520 should be a const. maybe put all the accepted filenames in a map and then we can just check if it's in the set
Drone Build Status: failure
https://build.openprivacy.ca/cwtch.im/cwtch/610
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/612
wip: image previewsto image previews