35f0e081a5
fix(GODT-2628): Attempt to fix closed channel panic on logout
...
It should not be possible to reach this state on purpose. But due to
scheduling and synchronization variances, it is possible in theory that
a UserDeathEvent can occur at the same time as the bridge is closing,
causing a call to `User.Close()` to be executed 2 times.
To avoid this in the future we just clear the map after all the channels
have been closed.
2023-05-17 11:54:02 +00:00
5fee2f707b
fix(GODT-2627): Properly handle recording of message with Bcc fields
...
Ensure the SMTP send recorder properly handles the recording of messages
which may have the same body hash but have different recipients. E.g.:
send the same message twice to 2 different users via Bcc.
The send recorder now maintains a list of send requests and waiting for
a message to be sent is done one the oldest of the messages.
2023-05-17 11:01:30 +02:00
d6304b087a
fix(GODT-2627): Fix crash on closed channel
...
See `TestSendHasher_DualAddDoesNotCauseCrash`'s comment for more
details.
2023-05-17 11:01:30 +02:00
d8ccc6c05d
fix(GODT-2626): Handle rare crash due to missing address update ch
...
Ensure that we can handle the rare case that can cause a crash if for
whichever reason we end up with an Address Delete and Message
Create/Update in the same event object.
2023-05-16 10:41:36 +02:00
4e3ad4f7fa
fix(GODT-2626): Server Events should not be merged.
...
d18e5932b28f83b201709a04fb7b8c6f74003574
Includes GPA bump: https://github.com/ProtonMail/go-proton-api/pull/80
2023-05-16 09:53:41 +02:00
98031d296e
Revert "fix(GODT-2588): Always perma-delete from Drafts/Trash"
...
This reverts commit f9a0c35daa .
2023-05-12 10:19:56 +02:00
0417e495ae
fix(GODT-2618): Crash when address does not have unlocked keyring
2023-05-09 08:31:28 +02:00
bda158d6c6
feat(GODT-2346): treat external address as disabled one.
2023-05-09 04:12:12 +00:00
a0db1645f2
fix(GODT-2614): Handle failed update during sync
...
The sync process was getting stuck since we never handled the case where
the update to Gluon failed. This caused the flush stage to exist, but
the sync process would continue until it eventually gets stuck due to
lack of progress.
2023-05-05 16:09:23 +02:00
b51d85e768
chore: upgraded golangci-lint v1.52.2 and fixed all issues.
2023-05-05 07:57:22 +02:00
543c35041d
fix(GODT-2464): Filter attachment name from content-type parameter to not send it twice to the API.
2023-05-02 07:13:21 +00:00
910060a14c
fix(GODT-2598): Map Message Size Error to Gluon Error
...
Prevents messages with invalid size from ending up in the recovery
mailbox.
2023-04-28 11:44:02 +02:00
fbbd0245de
feat(GODT-2569): Add functional test to validate community PR.
2023-04-27 12:21:48 +00:00
7002806999
feat(GODT-2569): Support multiple externalID matching if we send one of it when looking for parentID.
...
Change behavior of `getParentID`: when `getParentID` gets called on an
external ID and more than one message with that ID is found, inspect the
metadata flags and if only one of those messages is `MessageFlagSent`,
then choose that as the parent.
2023-04-27 12:21:48 +00:00
c49b42060e
chore(GODT-2576): Connector can send any flags to Gluon
...
Requires Gluon bump: https://github.com/ProtonMail/gluon/pull/344
2023-04-27 11:52:55 +02:00
d8fa2fb3e3
fix(GODT-2582): Update Gluon for updated GetMessageHash
...
This patch also update getMessageHash to use the fixed version in Gluon.
https://github.com/ProtonMail/gluon/pull/342
2023-04-26 14:53:38 +02:00
f9a0c35daa
fix(GODT-2588): Always perma-delete from Drafts/Trash
2023-04-25 13:49:05 +02:00
3ef3ab72ed
feat(GODT-2553): Try to send telemetry every hour.
2023-04-24 18:33:50 +00:00
b250d49af8
feat(GODT-2552): Send first heartbeat.
2023-04-24 18:33:50 +00:00
8093bbf5f6
feat(GODT-2502): Additional info.
2023-04-14 10:27:37 +02:00
7bb925b6d7
feat(GODT-2502): Improve logs.
2023-04-14 10:27:37 +02:00
3928ed08f6
feat(GODT-2554): Compute telemetry availability from API UserSettings.
2023-04-13 08:06:48 +00:00
7d51e9123d
chore: merge release/quebec to devel
2023-04-12 08:52:12 +02:00
098f294cac
fix(GODT-2573): Crash on null update
...
Ensure that if we don't produce an update we don't construct an update
array with nil values.
2023-04-11 10:36:26 +02:00
c84919faae
chore: merge release/Quebec into devel
2023-04-05 13:55:22 +02:00
7330406752
fix(GODT-2500): Recover in deferred function.
2023-04-05 09:25:24 +02:00
de5fd07a22
feat(GODT-2500): Reorganise async methods.
2023-04-03 07:07:22 +02:00
ec92c918cd
feat(GODT-2500): Add panic handlers everywhere.
2023-04-03 06:38:31 +02:00
ef1940d227
fix(GODT-2508): Handle Address Updated for none-existing address
...
If we receive an address update and the address does not exist, attempt
to create it.
2023-03-28 10:51:26 +02:00
0a0bcd7b90
fix(GODT-2508): Handle Address Updated for none-existing address
...
If we receive an address update and the address does not exist, attempt
to create it.
2023-03-27 13:49:27 +02:00
ec351330f1
chore: Replace go-rfc5322 with gluon's rfc5322 parser
...
Bumps Gluon version in order to get the fixes from
https://github.com/ProtonMail/gluon/pull/327 .
2023-03-20 10:25:41 +01:00
4f49c87bc6
chore: Replace go-rfc5322 with gluon's rfc5322 parser
...
Bumps Gluon version in order to get the fixes from
https://github.com/ProtonMail/gluon/pull/327 .
2023-03-17 16:23:36 +01:00
02ca6428b5
fix(GODT-2407): Replace invalid email addresses with emtpy for new Drafts
2023-03-17 13:25:42 +01:00
b3d0dfc60b
fix(GODT-2497): Do not report EOF and network errors
2023-03-16 14:19:58 +00:00
dd7c81ca4b
fix(GODT-2497): Do not report EOF and network errors
2023-03-16 14:40:51 +01:00
8b33d56b59
fix(GODT-2479): Ensure messages always have a text body part
...
Proton Backend requires that all messages have at least one text/plain
or text/html body part, even if it is empty.
2023-03-14 14:29:42 +01:00
3a85de2f3c
chore: merge branch release/perth_narrows into devel
2023-03-13 15:36:37 +01:00
a3aafabde3
feat(GODT-2455): upper limit for number of merged events.
2023-03-13 12:45:36 +00:00
1820af5021
chore: merge release/perth_narrows into devel
2023-03-13 11:40:54 +01:00
c3454360fc
fix(GODT-2442): Remove unnecessary call to go-sync
...
This is not required in this call since address mode changes are always
proceeded by the removal of the IMAP user and then the creation of a new
IMAP user which will trigger the sync again.
2023-03-08 17:39:08 +01:00
182dab18a6
fix(GODT-2442): Handle event poll not starting after resync
...
It is possible, on slower machines, that the new event poll task is not
yet registered and attempts to cancel have nothing to cancel.
In this case, we need the refresh event to cancel the task, at that
point it is guaranteed that the task exists.
2023-03-08 17:39:04 +01:00
d926dd3806
chore: refactor: error cause type.
2023-03-08 11:57:19 +01:00
b953468af2
fix(GODT-2419): avoid context canceled reports
2023-03-07 18:32:33 +01:00
86630ce137
chore(GODT-2442): improve naming, remove unrelated changes
2023-03-07 17:59:04 +01:00
2c9477d65c
fix(GODT-2442): WIP: bad events just aborts polls, feedback processed in separete channel.
2023-03-07 17:59:04 +01:00
34c002ff68
test(GODT-2442): test bad event feedback and clean-up.
2023-03-07 17:59:04 +01:00
f03688ba72
feat(GODT-2442): add gRPC interface to send feedback.
2023-03-07 17:59:04 +01:00
8c0bb22de3
feat(GODT-2442): handle bad event resync resolution.
2023-03-07 17:59:04 +01:00
70950e0048
fix(GODT-2457): Include address if GetPublickKeys() error message
2023-03-07 12:58:12 +01:00
9058544f5c
feat(GODT-2448): Supported Answered flag
...
Bump gluon and implement changes required for the flag changes.
2023-03-06 16:04:49 +01:00