holmesal / hashtag

shortwave on the internets
2 stars 0 forks source link

.priority for messages should use kFirebaseServerValueTimestamp #33

Open DogsForArms opened 10 years ago

DogsForArms commented 10 years ago

to post the message to messages//, we should use a message like:

{ "type": ..., "content": ..., "owner":..., "raw":..., "parsed":...., ".priority":kFirebaseServerValueTimestamp }

letting .priority take server time instead of device time, to solve for the mini bug that occurs when system times vary by a couple of seconds. The visible effect of this, if person A's system time is > system B's system time by a couple seconds:

Person A sends message, Person A, B receive (see) that message Person B then sends a message Person A,B receive person B's message, it is placed above (earlier) than person A's first message.

holmesal commented 10 years ago

EZ - I'll try passing in kServer... as a string, that should work.