Skip to content

Fix push notifications timestamp on Android (or other platforms that support the time stamp)

Jano requested to merge push_notifications_use_milliseconds_for_timestamps into master

Closes #841 (closed)

What does this MR do?

This MR changes the timestamp in message push notifications from a normal unix time stamp (seconds from 01/01/1970) to a millisecond timestamp, which is the actual way it's defined for WebPush.

Whilst before, due to the low number the date displayed for push notifications was something in January 1970, it now is correct.

How confident are you it won't break things if deployed?

Completely, I just multiply a number with 100, absolutely no side effects imaginable.

Links to related issues

This is also one point on #831 (closed)

How to test

First way to test it:

  1. Checkout branch locally
  2. Tunnel your localhost to a domain that has a TLS certificate, e. g. using a service like ngrok
  3. Temporarily add disableHostCheck: true, under the key devServer in the file serve.config.js, otherwise your setup won't be accessible over your domain tunnel
  4. If you don't have an Android device, ask your sister or someone else you know who has an Android to test it

Second way to test it:

  1. Approve the MR
  2. Merge it
  3. See what goes wrong on beta

I did it the first way, and it works. Now let's try the other one.

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Jano

Merge request reports