• laszlovl's avatar
    Make sure the time attribute for MAM message is parsed through moment · 565f7d9f
    laszlovl authored
    Messages (received directly or via MAM) are stored in a backbone
    collection that's kept sorted by the message's "time" attribute.
    Various parts of the codebase rely on this behavior.
    
    For regular messages, the time attribute is generated by
    `moment().format()`, which generates a timestamp in the browser's
    local timezone, for example "...+02:00".
    
    For MAM messages, we would previously copy the "delay.stamp" value
    into the "time" attribute verbatim. However, that value is generated
    by the server and is unlikely to be in the same timezone locale.
    
    ISO timestamps expressed in different timezones cannot be sorted
    lexicographically, breaking the premise of keeping the messages
    collection sorted by time.
    565f7d9f
converse-headless.js 2.1 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.