mattermost / mattermost-redux

Redux for Mattermost
Apache License 2.0
198 stars 386 forks source link

Why the timestamp of messages based on platform? #135

Open LeiHao0 opened 7 years ago

LeiHao0 commented 7 years ago

Submit feature requests to http://www.mattermost.org/feature-requests/. File non-security related bugs here in the following format:

Summary

I confused why the timestamp of messages based on platform? (only if the login user is admin)

Environment Information

Steps to reproduce

  1. Login as Admin
  2. change iPhone's Data&Time
  3. post a message

Expected behavior

mattermost-redux/src/actions/posts.js

const timestamp = Date.now();
...
  create_at: timestamp,
  update_at: timestamp

Observed behavior

The timestamp of this Message is based on iPhone's not sever's

Possible fixes

ThiefMaster commented 6 years ago

Probably because the post is created immediately in the UI, even before it has been sent to the server. I'm pretty sure this will eventually replace the timestamp with the one from the server.