As Alice is the person who delivered M1 , she already extra you to definitely message optimistically in order to their simulation
- Disregard the experience otherwise
- Procedure the event by simply making specific changes to their particular simulation instead of causing a dispute.
Bear in mind, upbeat UI functions by simulating the result until the servers responds. When your M1 regarding host is actually same as the new optimistically added M1 , she will be able to prefer to disregard the feel.
Yet not, within the OkCupid’s speak app, the actual id is decided whenever a contact are put in the databases. The customer execution spends a beneficial pseudo-arbitrary creator in order to make an alternative id toward hopeful message prior to including it to the simulation (why don’t we name this tempId ).
function generateTemporaryMessageId() get back `$Math. (mais…)