image previews #413

Merged
sarah merged 7 commits from ipreview into master 2021-12-19 00:46:31 +00:00
Owner
No description provided.
erinn added 3 commits 2021-12-17 00:48:33 +00:00
continuous-integration/drone/push Build is pending Details
continuous-integration/drone/pr Build is pending Details
5ae269c531
message previews - safety checks
dan reviewed 2021-12-18 17:38:59 +00:00
dan left a comment
Owner

just requests for consts for usability elsewhere and clearer reading
otherwise this LGTM

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 {
Owner

"filesharing" and "filesharing-images" should be consts

"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"))
Owner

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

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
erinn added 1 commit 2021-12-19 00:15:12 +00:00
continuous-integration/drone/push Build is pending Details
continuous-integration/drone/pr Build is pending Details
a392fa0cda
image previews - dan comments
sarah added 1 commit 2021-12-19 00:16:11 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
fa1729d08d
Merge branch 'master' into ipreview
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/610
erinn added 2 commits 2021-12-19 00:35:58 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
f8ca29e552
Merge branch 'ipreview' of git.openprivacy.ca:cwtch.im/cwtch into ipreview
sarah approved these changes 2021-12-19 00:46:04 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/612
sarah changed title from wip: image previews to image previews 2021-12-19 00:46:26 +00:00
sarah merged commit 27c2524cd8 into master 2021-12-19 00:46:31 +00:00
Sign in to join this conversation.
No description provided.