linagora / tmail-backend

GNU Affero General Public License v3.0
36 stars 17 forks source link

FCM user notifcations should not fail if "no longer existing types" stored on the DB #958

Closed quantranhong1999 closed 1 month ago

quantranhong1999 commented 5 months ago

Why

GIVEN at first TMail support a change type e.g. Thread, and user register updates for the Thread changes via FirebaseSubscription/set. WHEN TMail gives up supporting the Thread change type THEN:

Expect: Should not fail if DB contains the "no longer existing types".

How

Be more lenient in TypeStateFactory: skip the parsing failure upon retrieval phase and a WARN level log cf: https://github.com/linagora/tmail-backend/pull/956#discussion_r1515814867

Notes

Could contribute this to PushSubscription on James side if suitable...

chibenwa commented 5 months ago

Idem for PushSubscriptions / james push? (& JIRA ticket?)

quantranhong1999 commented 1 month ago

James side: https://github.com/apache/james-project/pull/2343

for postgres-app and FCM (on the TMail side) adoption: it could be done later as I introduced breaking change in the API so we would not forget to adapt.

Arsnael commented 1 month ago

Little james sha-1 upgrade on tmail-backend perhaps? :)

quantranhong1999 commented 1 month ago

Little james sha-1 upgrade on tmail-backend perhaps? :)

https://github.com/linagora/tmail-backend/pull/1126