Created new table to store the received message hashes. Checking this table when receiving messages to look for duplicates. Should be cleared of expired messages on app start and every hour after
Removed id which was not needed for seen messages. Refactored filter logic into function and found function name error
create unique index for contact prekeys (to allow using REPLACE)
Fixed lint stuff that merge brought back
Sending our public key in header of message
Now attaching our key to the source field when sending messages, allows messages to be decrypted with the fallback cypher
Now polling the server for messages every 5 seconds
Sending the source device with messages
Added mock respond function to request to leave it that same as the websocket stuff. RetrieveMessages now just returns the result
Polling now continues if the server responds with an error. Returning only the result from sendMessage and retrieveMessages
Revert commenting of unreachable code
Refactored http logic into own file
Revert a change to websocket-resources
Skeleton calcPoW function that prepares payload for hashingFunction to increment Uint8Array nonce
Util function for converting a number to its Uint8Array representation
Actually perform calculate PoW nonce for every message
Adding bytebuffer as dependency and updated package-lock
Move PoW to new file and execute it in child process
TODO: Move send message logic to callback after child process has finished calculating the PoW
Refactored nonce calculation to function to be awaited
More readable timestamp grab plus converted to seconds
Nonce is now returned as a base64 string and included in request header
Also converted timestamp and ttl to string when including them in the header
Added a couple comments and tidied up some nonce logic