fix(GODT-2425): Out of sync messages and read status

Apply fix required for gluon update.

Update Gluon to include revision where the fix was made. Includes:
 * https://github.com/ProtonMail/gluon/pull/313
 * https://github.com/ProtonMail/gluon/pull/316
 * https://github.com/ProtonMail/gluon/pull/317
This commit is contained in:
Leander Beernaert
2023-03-06 13:02:19 +01:00
parent 1d426e621c
commit 227bbf1c03
3 changed files with 9 additions and 7 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.18
require (
github.com/0xAX/notificator v0.0.0-20220220101646-ee9b8921e557
github.com/Masterminds/semver/v3 v3.1.1
github.com/ProtonMail/gluon v0.14.2-0.20230302123434-303e813f9e80
github.com/ProtonMail/gluon v0.14.2-0.20230306115955-a6b5ddffeb18
github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a
github.com/ProtonMail/go-proton-api v0.3.1-0.20230209110241-fe7894c4931a
github.com/ProtonMail/go-rfc5322 v0.11.0

6
go.sum
View File

@ -28,10 +28,8 @@ github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf h1:yc9daCCYUefEs
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf/go.mod h1:o0ESU9p83twszAU8LBeJKFAAMX14tISa0yk4Oo5TOqo=
github.com/ProtonMail/docker-credential-helpers v1.1.0 h1:+kvUIpwWcbtP3WFv5sSvkFn/XLzSqPOB5AAthuk9xPk=
github.com/ProtonMail/docker-credential-helpers v1.1.0/go.mod h1:mK0aBveCxhnQ756AmaTfXMZDeULvheYVhF/MWMErN5g=
github.com/ProtonMail/gluon v0.14.2-0.20230228154054-7b2d621cdfd0 h1:wLUaWZ15jn14V7TJ/mXvAPQEjsoX2d3KDxbBgohzt/c=
github.com/ProtonMail/gluon v0.14.2-0.20230228154054-7b2d621cdfd0/go.mod h1:z2AxLIiBCT1K+0OBHyaDI7AEaO5qI6/BEC2TE42vs4Q=
github.com/ProtonMail/gluon v0.14.2-0.20230302123434-303e813f9e80 h1:0OWYIOKaT+VnLSPzJEEzGK60pN34LLwZpgCpO4GuSuU=
github.com/ProtonMail/gluon v0.14.2-0.20230302123434-303e813f9e80/go.mod h1:z2AxLIiBCT1K+0OBHyaDI7AEaO5qI6/BEC2TE42vs4Q=
github.com/ProtonMail/gluon v0.14.2-0.20230306115955-a6b5ddffeb18 h1:X4UZxU7RYtZKz72HWDRbAndAzRZOiMHH/HucSg+u0oo=
github.com/ProtonMail/gluon v0.14.2-0.20230306115955-a6b5ddffeb18/go.mod h1:z2AxLIiBCT1K+0OBHyaDI7AEaO5qI6/BEC2TE42vs4Q=
github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a h1:D+aZah+k14Gn6kmL7eKxoo/4Dr/lK3ChBcwce2+SQP4=
github.com/ProtonMail/go-autostart v0.0.0-20210130080809-00ed301c8e9a/go.mod h1:oTGdE7/DlWIr23G0IKW3OXK9wZ5Hw1GGiaJFccTvZi4=
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo=

View File

@ -580,8 +580,12 @@ func (user *User) handleUpdateMessageEvent(ctx context.Context, message proton.M
update := imap.NewMessageMailboxesUpdated(
imap.MessageID(message.ID),
mapTo[string, imap.MailboxID](wantLabels(user.apiLabels, message.LabelIDs)),
message.Seen(),
message.Starred(),
imap.MessageCustomFlags{
Seen: message.Seen(),
Flagged: message.Starred(),
Draft: message.IsDraft(),
Answered: message.IsReplied == true || message.IsRepliedAll == true, //nolint: gosimple
},
)
user.updateCh[message.AddressID].Enqueue(update)