commits
JavaScript strings are encoded as UTF-16. When a Unicode character
outside of the BMP is part of a string, it is encoded as a surrogate
pair. For instance, '🎨' is encoded as '\uD83C\uDFA8', but a for-of loop
will treat that as a single character with length 2. In
getByteToCharMap, this was not handled, resulting in an incorrect value
of charIndex and links being placed at the wrong location in messages.
Stores liked post URIs in the atom store, modifying the Atom store in the util to store both the Post Uri and the LikeUri, to allow for storing what posts were liked and allowing for deleting the like record.
Also modified the hasLiked boolean to be true if the post has a like string, or if the post exists in the Liked Posts Cache.
JavaScript strings are encoded as UTF-16. When a Unicode character
outside of the BMP is part of a string, it is encoded as a surrogate
pair. For instance, '🎨' is encoded as '\uD83C\uDFA8', but a for-of loop
will treat that as a single character with length 2. In
getByteToCharMap, this was not handled, resulting in an incorrect value
of charIndex and links being placed at the wrong location in messages.
Stores liked post URIs in the atom store, modifying the Atom store in the util to store both the Post Uri and the LikeUri, to allow for storing what posts were liked and allowing for deleting the like record.
Also modified the hasLiked boolean to be true if the post has a like string, or if the post exists in the Liked Posts Cache.