π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clean up
Neeraj Guptaf21c77c72888
diff --git a/server/ente/social/comment.go b/server/ente/social/comment.goindex 88393b07aa..8f08fabab9 100644--- a/server/ente/social/comment.go+++ b/server/ente/social/comment.go@@ -2,16 +2,15 @@ package social// Comment represents an encrypted comment or reply stored in the database.type Comment struct {- ID string `json:"id"`- CollectionID int64 `json:"collectionID"`- FileID *int64 `json:"fileID,omitempty"`- ParentCommentID *string `json:"parentCommentID,omitempty"`- ParentCommentUserID *int64 `json:"parentCommentUserID,omitempty"`- UserID int64 `json:"userID"`- AnonUserID *string `json:"anonUserID,omitempty"`- Cipher string `json:"cipher,omitempty"`- Nonce string `json:"nonce,omitempty"`- IsDeleted bool `json:"isDeleted"`- CreatedAt int64 `json:"createdAt"`- UpdatedAt int64 `json:"updatedAt"`+ ID string `json:"id"`+ CollectionID int64 `json:"collectionID"`+ FileID *int64 `json:"fileID,omitempty"`+ ParentCommentID *string `json:"parentCommentID,omitempty"`+ UserID int64 `json:"userID"`+ AnonUserID *string `json:"anonUserID,omitempty"`+ Cipher string `json:"cipher,omitempty"`+ Nonce string `json:"nonce,omitempty"`+ IsDeleted bool `json:"isDeleted"`+ CreatedAt int64 `json:"createdAt"`+ UpdatedAt int64 `json:"updatedAt"`}diff --git a/server/ente/social/reaction.go b/server/ente/social/reaction.goindex 7e24628e3e..cad8a74056 100644--- a/server/ente/social/reaction.go+++ b/server/ente/social/reaction.go@@ -2,16 +2,15 @@ package social// Reaction represents an encrypted reaction scoped to a collection, file, or comment.type Reaction struct {- ID string `json:"id"`- CollectionID int64 `json:"collectionID"`- FileID *int64 `json:"fileID,omitempty"`- CommentID *string `json:"commentID,omitempty"`- IsCommentReply *bool `json:"isCommentReply,omitempty"`- UserID int64 `json:"userID"`- AnonUserID *string `json:"anonUserID,omitempty"`- Cipher string `json:"cipher,omitempty"`- Nonce string `json:"nonce,omitempty"`- IsDeleted bool `json:"isDeleted"`- CreatedAt int64 `json:"createdAt"`- UpdatedAt int64 `json:"updatedAt"`+ ID string `json:"id"`+ CollectionID int64 `json:"collectionID"`+ FileID *int64 `json:"fileID,omitempty"`+ CommentID *string `json:"commentID,omitempty"`+ UserID int64 `json:"userID"`+ AnonUserID *string `json:"anonUserID,omitempty"`+ Cipher string `json:"cipher,omitempty"`+ Nonce string `json:"nonce,omitempty"`+ IsDeleted bool `json:"isDeleted"`+ CreatedAt int64 `json:"createdAt"`+ UpdatedAt int64 `json:"updatedAt"`}diff --git a/server/pkg/repo/public/collection_link.go b/server/pkg/repo/public/collection_link.goindex 9443020871..5b2748bdd3 100644--- a/server/pkg/repo/public/collection_link.go+++ b/server/pkg/repo/public/collection_link.go@@ -23,7 +23,7 @@ type CollectionLinkRepo struct {// NewCollectionLinkRepository ..func NewCollectionLinkRepository(db *sql.DB, albumHost string) *CollectionLinkRepo {if albumHost == "" {- albumHost = "http://192.168.0.21:3002"+ albumHost = "https://albums.ente.io"}lockerHost := viper.GetString("apps.public-locker")if lockerHost == "" {diff --git a/server/pkg/repo/social/comments.go b/server/pkg/repo/social/comments.goindex 915809bc03..8794d9de9d 100644--- a/server/pkg/repo/social/comments.go+++ b/server/pkg/repo/social/comments.go@@ -304,7 +304,7 @@ func (repo *CommentsRepository) GetActiveUserIDs(ctx context.Context, collection// 2. Replies to user's commentsfunc (repo *CommentsRepository) GetAlbumFeedComments(ctx context.Context, collectionID int64, userID int64, since int64, limit int) ([]socialentity.Comment, bool, error) {query := `- SELECT c.id, c.collection_id, c.file_id, c.parent_comment_id, p.user_id AS parent_comment_user_id,+ SELECT c.id, c.collection_id, c.file_id, c.parent_comment_id,c.user_id, c.anon_user_id, c.cipher, c.nonce, c.is_deleted, c.created_at, c.updated_atFROM comments cLEFT JOIN comments p ON c.parent_comment_id = p.id@@ -336,20 +336,18 @@ func (repo *CommentsRepository) GetAlbumFeedComments(ctx context.Context, colleccomments := make([]socialentity.Comment, 0, limit+1)for rows.Next() {var (- file sql.NullInt64- parent sql.NullString- parentUserID sql.NullInt64- anon sql.NullString- cipher sql.NullString- nonce sql.NullString- comment socialentity.Comment+ file sql.NullInt64+ parent sql.NullString+ anon sql.NullString+ cipher sql.NullString+ nonce sql.NullString+ comment socialentity.Comment)if err := rows.Scan(&comment.ID,&comment.CollectionID,&file,&parent,- &parentUserID,&comment.UserID,&anon,&cipher,@@ -366,9 +364,6 @@ func (repo *CommentsRepository) GetAlbumFeedComments(ctx context.Context, collecif parent.Valid {comment.ParentCommentID = &parent.String}- if parentUserID.Valid {- comment.ParentCommentUserID = &parentUserID.Int64- }if anon.Valid {comment.AnonUserID = &anon.String}