Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Make new links joinable by default

Neeraj Gupta218c652ed116
diff --git a/server/ente/public_collection.go b/server/ente/public_collection.go
index ef22302b89..eb1bd8c385 100644
--- a/server/ente/public_collection.go
+++ b/server/ente/public_collection.go
@@ -12,7 +12,7 @@ import (
type CreatePublicAccessTokenRequest struct {
CollectionID int64 `json:"collectionID" binding:"required"`
EnableCollect bool `json:"enableCollect"`
- // defaults to false
+ // defaults to true
EnableJoin *bool `json:"enableJoin"`
ValidTill int64 `json:"validTill"`
DeviceLimit int `json:"deviceLimit"`
diff --git a/server/pkg/repo/public_collection.go b/server/pkg/repo/public_collection.go
index 3b5aa6dbce..f5ae8f2d72 100644
--- a/server/pkg/repo/public_collection.go
+++ b/server/pkg/repo/public_collection.go
@@ -38,7 +38,7 @@ func (pcr *PublicCollectionRepository) GetAlbumUrl(token string) string {
func (pcr *PublicCollectionRepository) Insert(ctx context.Context,
cID int64, token string, validTill int64, deviceLimit int, enableCollect bool, enableJoin *bool) error {
// default value for enableJoin is true
- join := false
+ join := true
if enableJoin != nil {
join = *enableJoin
}