Commit graph

169 commits

Author SHA1 Message Date
Neeraj Gupta 4694bf6b7e [server] Ratelimit add device code API for cast 2024-04-25 14:07:10 +05:30
Neeraj Gupta 8038583d5a [server] Restrict casting to same IP 2024-04-25 14:03:25 +05:30
Neeraj Gupta ef0873082a Fixed typo 2024-04-25 13:02:54 +05:30
Neeraj Gupta 5afc2de7bc [server] Add admin endpoint for updating feature flag 2024-04-22 17:43:14 +05:30
Neeraj Gupta 648806baa7 [server] Add endpoint to get user feature flags 2024-04-22 17:30:54 +05:30
Neeraj Gupta 3fbf6674fe [server] Add API to return feature flags value 2024-04-22 16:57:00 +05:30
Neeraj Gupta 5b4d66933e [server] Add req validation for remoteStore insertOrUpdate 2024-04-22 16:44:12 +05:30
Neeraj Gupta 59ce8ea9bb [server] Fix another validation issue 2024-04-22 10:18:18 +05:30
Neeraj Gupta b43e077a24 [server] Another fix in file update req validation 2024-04-22 09:53:48 +05:30
Neeraj Gupta 74360f3c84 [server] Fix validation for fileUpdate 2024-04-22 09:41:14 +05:30
Neeraj Gupta d0621eea3e [server] Limit copying max 100 files in single req 2024-04-20 12:54:27 +05:30
Neeraj Gupta cbdd116cea [server] Copy thumb and file in parallel 2024-04-20 12:49:28 +05:30
Neeraj Gupta 91620965b0 [server] Minor refactor 2024-04-20 12:37:35 +05:30
Neeraj Gupta 5a5e3d28cb [server] Copy files in parallel 2024-04-20 12:36:18 +05:30
Neeraj Gupta bf738d9585 [server] Lint fix 2024-04-20 12:23:00 +05:30
Neeraj Gupta ca7b03e945 [server] Fix incorrect pointer assignment in collection file map 2024-04-20 12:21:44 +05:30
Neeraj Gupta fbf8b61891 [server] Fix query 2024-04-19 19:20:21 +05:30
Neeraj Gupta 710f76ee40 Merge remote-tracking branch 'origin/main' into save_a_copy 2024-04-19 13:36:00 +05:30
Neeraj Gupta 04df64de05
[server] Improvate req validation on file createOrUpdate (#1485)
## Description
During the testing of copyFile functionality, I ran into issues where
files were created without all attributes (esp File EncryptedKey & Nonce
for thumbnail and file decryption).
This change

## Tests
Tested regular file upload, unable to test update as Photos app on
simulator is not showing save option. I don't expect it to break.
2024-04-19 12:11:57 +05:30
Neeraj Gupta 816fa330de [server] Implement support for copying object 2024-04-19 11:26:14 +05:30
Neeraj Gupta c124cde471 [server] Add basic scaffold for copying files 2024-04-17 15:43:48 +05:30
Neeraj Gupta aabb884828 [server] Add validation logic for file copy 2024-04-17 15:19:20 +05:30
Manav Rathi 74b9a2a408
[server] Specify a default for apps.public-albums
local.yaml is only loaded in the local environment, and will not be used in
production. To avoid specifying it in both production and local configurations,
use it as a default specified in the code instead (that's the pattern we're
using in other places too from what I remember, maybe we should refactor that
too, but that's a bigger task not tied to this change).

**Tested by**

On a local dev cluster
- Not specifying anything and ensuring that the default is picked
- Specifying an override in museum.yaml and verifying that is used instead
2024-04-16 09:19:13 +05:30
Neeraj Gupta c73dc36a8c
[Server] Fix data cleanup pipeline for recovered account (#1410)
## Description
For accounts that were recovered post deletion (within x days), we were
not removing the entry from data_cleanup cron.

The data_clean up cron anyways verify that the account is indeed deleted
before proceeding with deletion, so it was not causing any harm, but the
cron was logging error.

## Tests

- [x] Verify that data clean up entry is removed if the account is
recovered
- [x] Verify that for existing data_cleanup entry for already recovered
account, the entry is deleted from cron.
2024-04-15 10:09:29 +05:30
Neeraj Gupta 8ed2c7cff9
[server] Pick base publicHost url from config (#1443)
## Description

## Tests
Ran locally with the config in local.yaml and verified that it's
modified as well when I had put localhost:3002 in the museum.yaml config
2024-04-15 09:56:21 +05:30
Neeraj Gupta a9072d7dcb [server] Add todo 2024-04-12 13:16:55 +05:30
Neeraj Gupta 830483ca68 [server] Remove existing scheduledDelete entries if account is recovered 2024-04-11 11:03:57 +05:30
Neeraj Gupta 02e8861e96 [server] Remove entry from data cleanup on account recovery 2024-04-11 10:54:38 +05:30
Neeraj Gupta 339d728774 [server] Handle no user err gracefully 2024-04-11 10:29:39 +05:30
Neeraj Gupta fa195af971 [server]Change log level to warning 2024-04-11 10:26:19 +05:30
Neeraj Gupta ed69de9875 [server]Log invalid password at warn level 2024-04-11 10:21:56 +05:30
Neeraj Gupta 46188313ad Minor refactor 2024-04-09 11:20:45 +05:30
Neeraj Gupta 73eacfb30d [server] Use correct app while updating ott table 2024-04-09 11:14:44 +05:30
vishnukvmd c32badc82c [server] Delete the subscriber on listmonk when needed 2024-04-05 17:12:06 +05:30
Manav Rathi 74decc32de
[server] Allow a configurable sslmode
Tested

- Existing defaults remain unchanged
- Setting db.sslmode = require in museum.yaml is honoured (in the docker compose environment, that causes the db connection to fail as expected)
2024-04-05 11:52:22 +05:30
Manav Rathi b6177a5bc3
Listmonk mailing list control (#1289)
## Description
Add listmonk mailing list subscribe and unsubscribe

## Tests
Tested getSubscriberID, unsubscribe, and subscribe using a locally
running listmonk server with different parameters.
- [x] A new subscriber is created and added to the listmonk campaign
mailing list on listmonkSubscribe() for the given list IDs
- [x] Subscriber is removed from listmonk campaign mailing list on
listmonkUnsubscribe() for the given list IDs
- [x] The old email address is unsubscribed, and the new email is
subscribed when a user updates the email
2024-04-04 17:21:55 +05:30
Vishal d8190926fd Change if-else 2024-04-04 11:24:13 +05:30
Vishal 92715b658c Change API parameter 2024-04-03 19:24:12 +05:30
Vishal 2ddf4c897c Rectify if else 2024-04-03 18:25:41 +05:30
Vishal ffefae89a6 Redefine struct 2024-04-03 17:50:53 +05:30
Vishal 39ec761949 fix warnings 2024-04-03 12:57:37 +05:30
Vishal 01f842c445 Rearrange methods 2024-04-03 12:41:18 +05:30
Neeraj Gupta 2fe703df92
[server] Increase embedding fetch limit (#1300)
## Description

Also use different semaphore than existing diff API

## Tests
2024-04-03 12:38:34 +05:30
Vishal 18c48c7e0a Fix typo in comment 2024-04-03 11:14:55 +05:30
Neeraj Gupta 85778bcdaa [server] Fix handling of redundant auth update 2024-04-03 07:05:03 +05:30
Vishal b8100b1273 rename functions 2024-04-02 17:45:30 +05:30
Vishal a5fcbbf901 add listmonk mailing list control (subscribe/usubscribe) 2024-04-02 17:36:53 +05:30
Neeraj Gupta 25cedd5e2f
[server] Gracefully handle stale collection entry (#1260)
## Description

## Tests
2024-03-30 15:24:52 +05:30
Neeraj Gupta 459c4515a0 [server] Drop locationTag table and related code 2024-03-29 16:08:28 +05:30
Vishal d5f0334a34 Remove isEnabled from config 2024-03-28 17:44:08 +05:30
Vishal 1f75633c5c Private method to bottom of the file 2024-03-28 15:03:27 +05:30
Vishal cc3376154f Change name 2024-03-27 22:39:12 +05:30
Vishal a7692b7d2e Update if else 2024-03-27 21:40:40 +05:30
Vishal 9893e3f305 Add Amazon SES for sending mails 2024-03-27 19:58:27 +05:30
vishnukvmd 44403c94c2 Cancel SEPA subscriptions when payments fail 2024-03-27 16:20:58 +05:30
vishnukvmd 25a054287a Prevent duplicate emails for SEPA 2024-03-27 14:22:30 +05:30
vishnukvmd 888aca7e6c Extract common code 2024-03-26 21:11:57 +05:30
vishnukvmd 31d3319d20 Revert "Depend on subscription-past-due events to trigger the account-on-hold email"
This reverts commit a131c16f4e.
2024-03-26 20:59:02 +05:30
vishnukvmd a131c16f4e Depend on subscription-past-due events to trigger the account-on-hold email 2024-03-26 20:29:55 +05:30
vishnukvmd f2aac262b1 Remove unused flag 2024-03-25 23:27:39 +05:30
vishnukvmd 4afc056a9f Stop listening to subscription deleted events 2024-03-25 23:26:48 +05:30
vishnukvmd 2dcf5daf54 Handle cases where default payment method might not be specified 2024-03-25 23:16:20 +05:30
vishnukvmd 29245b73b9 Cancel subscriptions on SEPA failures immediately 2024-03-25 23:15:43 +05:30
vishnukvmd d003542e42 Simplify how last payment method is fetched 2024-03-25 23:13:56 +05:30
vishnukvmd a275ab7740 Set subscription to expire 7 days after payment failure 2024-03-23 14:37:29 +05:30
vishnukvmd e634310cb1 Remove unused method 2024-03-21 14:49:37 +05:30
vishnukvmd b95d7c241d Create new subs only if the existing subscription is in a cancelled state 2024-03-21 14:48:29 +05:30
vishnukvmd 3cf680eec1 [WiP] Prevent subscription cancellation 2024-03-21 14:42:38 +05:30
vishnukvmd 1f17f2442a Handle SEPA failures 2024-03-21 14:33:10 +05:30
vishnukvmd 859af52c64 Remove commented code 2024-03-21 13:55:42 +05:30
vishnukvmd 78e5e3bdb1 Minor refactor 2024-03-21 13:31:46 +05:30
vishnukvmd 5635e63cb7 Update handling for subscription updated events 2024-03-21 13:29:42 +05:30
Abhinav 520f7ab64c only use PaymentBehaviorAllowIncomplete for SEPA payment method 2024-03-21 07:18:28 +05:30
Abhinav 4e074770d2 invoice client specific invoice api 2024-03-21 06:48:49 +05:30
vishnukvmd db81f52cf1 Update mail when subscription is on-hold 2024-03-20 14:31:01 +05:30
vishnukvmd 628565cfaf Merge branch 'main' into sepa-fix 2024-03-20 14:08:36 +05:30
Vishnu Mohandas 8101fe1495
Patch few Stripe related issues (#1156) 2024-03-20 14:07:26 +05:30
vishnukvmd 61d5f3189b Update cancellation status on receiving webhook from Stripe 2024-03-20 14:05:09 +05:30
Abhinav 6b749294ce fix sepa issue 2024-03-19 18:40:32 +05:30
Neeraj Gupta 685e1b82c9 [server] Fix query for diff API 2024-03-19 12:09:39 +05:30
Neeraj Gupta 2b3494e61c [server] Return embedding version in API response 2024-03-19 11:25:00 +05:30
Neeraj Gupta e8756a8cf7 [server] Remove unused code 2024-03-19 11:06:36 +05:30
Neeraj Gupta 05b0f1649f [server] store embedding objSize & version 2024-03-19 11:02:22 +05:30
Neeraj Gupta f0236acf8f [server] Minor bug fixes in embedding/files API 2024-03-19 06:15:55 +05:30
Neeraj Gupta b9ec72bbb4 Merge branch 'main' into file_embedding 2024-03-18 13:12:14 +05:30
Neeraj Gupta 7de60f1ced [server] Reduce discord message frequency 2024-03-18 10:02:13 +05:30
Neeraj Gupta 4acc8395ba [server] Prefix discord msg with hostname 2024-03-18 09:59:35 +05:30
Neeraj Gupta 12b9ac4db6
[server] Rate limit (#1121)
## Description

## Tests
2024-03-17 09:59:59 +05:30
Neeraj Gupta e927064476 [server] Add endpoint to get embedding for givenFilesIds 2024-03-17 09:37:02 +05:30
Neeraj Gupta 36982c5332 [server] Add util to findMissingElements while comparing two arrays 2024-03-16 02:30:25 +05:30
Manav Rathi 92ae1be40a
Add a new flag to support S3 path style URLs without disabling SSL
The use case for this came up in Discord - someone is running a custom self
hosted instance where they're using MinIO as their "production S3", but it is
not local (so they don't want the clients to connect without SSL). So we need a
way to get MinIO to work, which needs path style URLs, without also disabling
the SSL.
2024-03-15 17:18:48 +05:30
vishnukvmd 77276d8d6c [server] Add admin API to change email address 2024-03-13 17:31:38 +05:30
Neeraj Gupta c0a2347b80 [server] Refactor /user/plans 2024-03-12 12:17:04 +05:30
Neeraj Gupta e843ea6669 [server] Change param type from uuid to string 2024-03-11 22:45:53 +05:30
Neeraj Gupta bb68b22adb [server] mark queue as deprecated 2024-03-11 15:41:18 +05:30
Neeraj Gupta 5accf4c6a8 [server] Remove dead code related to collecton trashV2 2024-03-11 15:41:18 +05:30
Neeraj Gupta 28335700e3 [server] Remove deprecated API 2024-03-11 15:41:18 +05:30
Neeraj Gupta 9711e0e29e Improve log 2024-03-11 12:34:03 +05:30
Neeraj Gupta 12903a3748 [server] Clean up collecitonDiff logs 2024-03-11 12:34:03 +05:30
Neeraj Gupta 4af3030c81 [server] Speed up RemoveComplianceHolds 2024-03-11 11:43:02 +05:30