Commit Graph

815 Commits (6df5d612c1b489c6da9401af3a1019f54bfde5bf)

Author SHA1 Message Date
Ryan Tharp 1536a7e5f9 support multiple RSS feeds 6 years ago
Ryan Tharp d0ddcaf1fe update feed url, handle no items more gracefully, start on dns check 6 years ago
Ryan Tharp 93eb19bab5 add space, refactor out friendRequestStatusEnum 6 years ago
Ryan Tharp 22cb7cd540 node/browser constant 6 years ago
Ryan Tharp 3d40b55011 do the deferencing correctly 6 years ago
Ryan Tharp c57571fdfd loki.network rss feed 6 years ago
sachaaaaa d208614909 Multi-device part 1: make primary account generate and send authorisation to secondary 6 years ago
Beaudan c9f433fbba Save message id when sending/receiving to/from public server and lint 6 years ago
Beaudan 899bfc3b2b Add channel id to message table and provide helper functions 6 years ago
Beaudan f857744e88 Revert sending id 6 years ago
Beaudan 145b8b6682 Fix message order 6 years ago
Beaudan 86e55e5dc6 Clean up bold check 6 years ago
Beaudan f7039080af Remove accidental swapfile, save messages with the id given to them from public server 6 years ago
Beaudan f718bf15d2 Prepare to delete message, send message id to server 6 years ago
Beaudan 1a82a35a08 More efficient channel search 6 years ago
Beaudan 143bf1bdc1 Fill out unregister channel stub, trigger unregister channel on conversation deletion 6 years ago
Beaudan 014558d939 Squash and clean of old PRs, move towards sending cleartext again 6 years ago
Beaudan Campbell-Brown 73b417e605
Merge pull request #371 from BeaudanBrown/testnet
Separate testnet
6 years ago
Beaudan 492bb3723a Move pubkey truncation to loki_rpc and add window function 6 years ago
Beaudan Campbell-Brown 0e9372d3d5
Merge pull request #373 from msgmaxim/timestamp-error
Show correct error on incorrect timestamp
6 years ago
Beaudan 6140fef1f7 Fix some bugs 6 years ago
Maxim Shishmarev 09d279dd93 Show correct error on incorrect timestamp 6 years ago
Beaudan 43c2e9c953 Use different seed nodes for development vs production and strip 2 characters from pubkey on testnet 6 years ago
Beaudan 63396669bc Add eslint rule to enforce curlys, run eslint --fix to automatically apply this rule and add swapfiles to gitignore 6 years ago
Beaudan c53a35deeb Comment explaining stopPollingPromise 6 years ago
Beaudan 6ef94fa43d Start attempt at closing long polling connections when offline event is triggered 6 years ago
Beaudan 1c9fe5b9f5 Make sure we are purging nodes from retrieve swarm list, and also filter 0.0.0.0 ips when getting snodes from wrong swarm error 6 years ago
Beaudan 9910ef0c13 Rename bool 6 years ago
Beaudan b49be51f36 Don't return early if recalculating PoW 6 years ago
Beaudan 804fc076cc Refresh swarm list 1 time for outgoing messages 6 years ago
Beaudan df2c4af67c Run lint and check for ip or address when removing unreachable nodes 6 years ago
Beaudan Campbell-Brown 5aedd618c0
Merge pull request #324 from BeaudanBrown/improve-http-error
Also put the body in httperror
6 years ago
Beaudan 68c1932b7b Little better arguments 6 years ago
Beaudan 65a09d12b6 Make sure we try a different seed node every time 6 years ago
Beaudan f02e885662 Print body of http error as well 6 years ago
Beaudan 10e61c37da Retry initialiseRandomPool some times if request fails, fix uncaught promise in sendMessage 6 years ago
Beaudan 87c5d0858c Choose a random seed node from a list for bootstrapping 6 years ago
Beaudan Campbell-Brown fee25036be
Merge pull request #321 from BeaudanBrown/faster-fail
Remove nodes after 1 failure and only wait for a single successful send
6 years ago
Beaudan 580931c4fb Pass ourKey to message api, initialise these APIs after registration or when storage is ready so we always have ourKey 6 years ago
Beaudan d647fb1eb8 Remove nodes after 1 failure and only wait for a single successful send before updating UI 6 years ago
sachaaaaa c53633e367 Clearnet p2p with https (no verification yet) 6 years ago
Beaudan eb1fa97c9c Make use of ip consistent for random snode pool and swarm list 6 years ago
Beaudan ee260f7de0 Fix silly filtering bug, add filtering for swarm nodes and lint 6 years ago
Beaudan 96f7949ac8 Update endpoint for storage server and p2p 6 years ago
Beaudan Campbell-Brown 436af1a990
Merge pull request #313 from BeaudanBrown/random-list
Random list
6 years ago
Beaudan c5c01b0ac8 Purge retrieving snodes 6 years ago
Beaudan d82b5e1998 Remove random snodes if they fail and then try again. Throw seed node error if getRandomSnodeAddress fails. Filter out 0.0.0.0 nodes. 6 years ago
Beaudan 923d7ffe27 Change to get_n_service_nodes method 6 years ago
Beaudan d12f6b6d32 Handle swarm nodes the same for us or contacts, attach our key to message api object 6 years ago
Beaudan 0948a344d2 Review refactor 6 years ago
Beaudan d5546b9473 Lint 6 years ago
Beaudan b6b0248e9d Retrieve from seed 6 years ago
Beaudan 1f74088586 Send to IP 6 years ago
Beaudan 6b2b9ce926 Remove default port and use port from storage server responses 6 years ago
Beaudan eea2b8e6a7 Do port null check inside rpc call 6 years ago
Beaudan 52c191fc94 Merge branch 'development' into clearnet 6 years ago
sachaaaaa 9d6c5bff36 make unverified https queries to the snodes 6 years ago
Beaudan 7141847dfb Restart sendMessage logic if PoW changed an dfix NaN bug 6 years ago
Beaudan f01d8088b7 Remove development PoW 6 years ago
Beaudan dad52a784d Change wrong pow http response 6 years ago
Beaudan dbcaaf98dc Lint 6 years ago
Beaudan c27d1ef69a Clean some stuff in loki_rpc and get new difficulty from successful requests 6 years ago
Beaudan e520bf109a Persist PoW difficulty and update if get response from snodes 6 years ago
Beaudan 18a87d5463 Review changes 6 years ago
Beaudan c02d5d4053 Lint 6 years ago
Beaudan 709db4bf54 Make sendMessage take options, remove redundant retrieve function and get constant 6 years ago
Beaudan b43978ece1 Initial refactoring of sendmessage 6 years ago
Beaudan Campbell-Brown 1e11a6527c
Merge pull request #289 from Mikunj/p2p-ping
Updated pinging logic.
6 years ago
sachaaaaa 1b1c18b928 Patch from Beau 6 years ago
Mikunj 147861790b Always send application/json as content type in rpc. 6 years ago
Mikunj bc6586e5ce Removed duplicated function. 6 years ago
Mikunj f77b67d358 Updated tests.
Fix some minor logic.
6 years ago
Mikunj 986d34bbd9 linting 6 years ago
Mikunj d4de4b13dd Fix incorrect import. 6 years ago
Mikunj b4390a8c95 Updated pinging logic. 6 years ago
sachaaaaa edd5915bf2 Fix use .length on object 6 years ago
sachaaaaa 5f77f751d9 Replace generator function and other various fixes 6 years ago
sachaaaaa 09a9cfbf37 Refactor long polling for better concurrent requests 6 years ago
Beaudan Campbell-Brown e99cec9c09
Merge pull request #272 from Mikunj/signal-1.24
Signal 1.24
6 years ago
beaudan 54bd75e9a6 Wait for a longer time after failed poll and extend default timeout 6 years ago
Mikunj fbbf454c49 Merge branch 'development' into signal-1.24 6 years ago
Beaudan Campbell-Brown 318371a652
Merge pull request #264 from BeaudanBrown/remove-signal-references
Remove Signal references
6 years ago
Mikunj 8808100796 Merge signal-1.24.0
# Conflicts:
#	.github/PULL_REQUEST_TEMPLATE.md
#	background.html
#	config/default.json
#	config/production.json
#	js/models/conversations.js
#	js/models/messages.js
#	js/views/conversation_view.js
#	js/views/inbox_view.js
#	js/views/settings_view.js
#	main.js
#	package.json
#	test/index.html
#	ts/components/conversation/ContactName.tsx
#	yarn.lock
6 years ago
Mikunj 3a8111020e Merge v1.23.0
# Conflicts:
#	background.html
#	package.json
#	yarn.lock
6 years ago
Mikunj 1f03e04d8c Merge commit 'c75a756b2a58bd4a79890e34673d95d9f17f3f01' into signal-1.23
# Conflicts:
#	js/views/conversation_view.js
#	package.json
#	ts/components/ConversationListItem.tsx
#	ts/components/conversation/ConversationHeader.tsx
6 years ago
Mikunj 12ce0140de Left pane changes.
Merge commit 'b3ac1373fa64117fe2a9ccfddf3712f1826c06d9' into signal-1.23

# Conflicts:
#	_locales/en/messages.json
#	background.html
#	js/background.js
#	js/conversation_controller.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/views/conversation_list_item_view.js
#	js/views/conversation_list_view.js
#	js/views/conversation_search_view.js
#	js/views/inbox_view.js
#	libtextsecure/account_manager.js
#	package.json
#	stylesheets/_global.scss
#	stylesheets/_index.scss
#	stylesheets/_modules.scss
#	test/_test.js
#	test/index.html
#	test/models/conversations_test.js
#	test/views/conversation_search_view_test.js
#	ts/components/ConversationListItem.tsx
#	ts/components/MainHeader.tsx
#	ts/components/conversation/ConversationHeader.tsx
#	ts/components/conversation/ResetSessionNotification.tsx
6 years ago
Mikunj 48c4ed1a29 Partial Merge commit 'bf904ddd129ceba8fa363ccf6d10ecd256c65f63' into signal-1.23
# Conflicts:
#	_locales/en/messages.json
#	app/sql.js
#	js/background.js
#	js/conversation_controller.js
#	js/models/conversations.js
#	js/views/inbox_view.js
#	main.js
6 years ago
Mikunj e343a04eea Merge commit '18b5b7c046436f2defab2e20407e22da180bf97b' into signal-1.22
# Conflicts:
#	app/sql.js
#	background.html
#	config/default.json
#	js/background.js
#	js/models/conversations.js
#	js/models/messages.js
#	js/modules/data.js
#	js/signal_protocol_store.js
#	js/views/conversation_search_view.js
#	libtextsecure/message_receiver.js
#	libtextsecure/sendmessage.js
#	main.js
#	package.json
#	preload.js
#	test/index.html
#	ts/components/Avatar.tsx
#	ts/components/conversation/ConversationHeader.md
#	ts/components/conversation/ConversationHeader.tsx
6 years ago
Beaudan 8ff647e3cd Return instead of await 6 years ago
Beaudan e63e9b9053 Small optimisation 6 years ago
Beaudan faf1b4b66b Lint 6 years ago
Beaudan 620380d2d9 Move filter messages to message api and some other cleaning 6 years ago
Beaudan 796181e00c Add database functions for storing, retrieving and cleaning last hash for snodes 6 years ago
Beaudan 960bd3fff2 Move JobQueue to be a module so that we can use it in preload 6 years ago
Beaudan 7eabae18f5 Replaced more references to signal with loki and updated CONTRIBUTING.md 6 years ago
Beaudan 377e90bafe Include long polling header for retrieve messages, extend retrieveMessages timeout to 40 seconds, reduce default tmeout to 5 seconds, remove dev/prod poll time difference 6 years ago
Beaudan Campbell-Brown 495ddcabab
Merge pull request #262 from BeaudanBrown/millisecond-times
Ttl and timestamp milliseconds
6 years ago
Beaudan db8f8ba36f Multiple all ttl values by 1000 and stop dividing timestamp by 1000 so they are both milliseconds 6 years ago
Beaudan f69e6ec763 Disable encryption 6 years ago
Beaudan f076f94e71 Clearer last hash line 6 years ago
Beaudan fa7042c043 Added wrong swarm error which gets thrown if we receive a 421 error, update the swarm lists if we get one of those errors 6 years ago
Beaudan 0f771d4db4 Rename loki_fetch to loki_rpc 6 years ago
Beaudan b09f2970fc Move NotFoundError to errors.js 6 years ago
Beaudan 929d272fcc Fixed bugs with http being appended at wrong time and lastHash not being sent properly 6 years ago
Beaudan 531ee92dcb Updated messenger to work with slightly different storage server API and changed swarm requests to go through storage server 6 years ago
Scott Nonnenberg 74cb808763 New MessageController as the single place for in-memory messages 6 years ago
Scott Nonnenberg 8c4d90df07 Send long text as an attachment instead of inline
Remove Android length warning

Handle incoming long message attachments

Show long download pending status in message bubble

Fix the width of the smallest spinner

Remove Android length warning from HTML templates
6 years ago
Beaudan 0b6849c96a Review comment plus added a todo 6 years ago
Beaudan 6656a89092 Cleaned up a lot of the logs, stop them from printing more than once etc 6 years ago
Scott Nonnenberg b3ac1373fa Move left pane entirely to React 6 years ago
Scott Nonnenberg fbda313d09 Add job details to attachment download log warning 6 years ago
Scott Nonnenberg ae161c6cf6 Update to Electron 4.x 6 years ago
Scott Nonnenberg ae2db9f09a Improve handling for URLs composed of mixed character sets 6 years ago
Beaudan Campbell-Brown 8e3542b511
Merge pull request #213 from sachaaaaa/channel_encryption
Hook up channel encryption
6 years ago
Beaudan 8c20a31dd4 Review suggestions 6 years ago
sachaaaaa 53b0574a1f Merge branch 'development' into channel_encryption
* development:
  Manually set the dns servers for windows
  Refactor local_loki_server
  Refactor rpc calls to its own function.

# Conflicts:
#	js/modules/loki_message_api.js
6 years ago
sachaaaaa 55e0ff1a88
Merge pull request #208 from Mikunj/message-api-refactor
Refactor rpc call to its own function.
6 years ago
sachaaaaa ad5efc9ba3 lint 6 years ago
sachaaaaa aa722590fa use channel encryption with storage server 6 years ago
Beaudan 72d00e0922 Manually set the dns servers for windows 6 years ago
Mikunj 4a037387e9 Refactor rpc calls to its own function. 6 years ago
Mikunj 06be1da40d Added p2p message styling 6 years ago
Beaudan c0a6ba25bc Update p2p messages to follow the same endpoint format as storage server. Clean up message_api a lil bit and updated tests 6 years ago
Beaudan 08dee14802 Review comment 6 years ago
Scott Nonnenberg 3917ab940e web_api: Fix caching of https.agent objects between requests 6 years ago
Scott Nonnenberg 3fb6ab295f Debug log optimizations and improvements 6 years ago
Scott Nonnenberg d4eacda649 Disable import/export outside of test mode; not currently used 6 years ago
Beaudan 0516e69ff7 Fix tests 6 years ago
Beaudan dc67aaf9cc Roll back change to ping more often again, ping our offline contacts every 2 mins to check if they have come back online 6 years ago
Beaudan 29bca71d5a Try ping contacts that send us storage server messages in the last 2 mins 6 years ago
Beaudan d6a210efaa Reworked the update p2p details to be more robust and stopped some redundant pings from happening 6 years ago
Beaudan 25ded46e2c Fixed some bugs removing nodes after the first failure instead of waiting for the failure count and also reduced the number of errors logged and made some warnings 6 years ago
Beaudan b00a0cb699 Rename isOnline to isPing for clarity, and reduce the ttl for online broadcast messages to 1 min 6 years ago
sachaaaaa d3f23db049 serialise objects to json before node-fetch 6 years ago
sachaaaaa 8eac72b60c Fix typo 6 years ago
sachaaaaa ed1d06d9ce use 'params' as per json_rpc 6 years ago
sachaaaaa 159dc711e1 use new message json rpc API 6 years ago
Beaudan 2fd746821a Added function for getting your loki IP and bind the local server 6 years ago
Beaudan 6426a5eb9b Added ability to look up our .loki address and now send that with our LokiAddress messages 6 years ago
Scott Nonnenberg 28f96fe893 Ensure that we capture sender even if thrown error is falsey 6 years ago
Scott Nonnenberg 5b54c9554e Remove groups table, conversation is single source of truth 6 years ago
Scott Nonnenberg 041fe4be05 Remove JSON column and Backbone Model for unprocessed 6 years ago
Scott Nonnenberg 9c540ab977 Add cache support to Signal Protocol Store 6 years ago
Scott Nonnenberg 1d2c3ae23c Download attachments in separate queue from message processing 6 years ago
Scott Nonnenberg 858c7e629f Fine-tune linkification technique for link previews 6 years ago
Beaudan 2d9e6a7ac8 Review comments 6 years ago
Beaudan 2311bd1328 Fix bug with swarm node reference, now we should only refresh swarm nodes when they fail 6 years ago
Beaudan 5d823de6f9 Renamed lokiSnodeAPI to start with lower case for consistency, refactor snode API to use conversation controller 6 years ago
Mikunj a989a1a818 Save previews locally. 6 years ago
sachaaaaa f900a08eda
Merge pull request #177 from sachaaaaa/merge_1_21_0
Merge Signal 1.21.0
6 years ago
sachaaaaa a0f67c22da Merge branch 'textsecure/master' into merge_1_21_0
* textsecure/master: (26 commits)
  v1.21.0
  v1.21.0-beta.4
  Dark Theme: Preserve blue background on app loading screen
  Localization updates
  Fix width of audio player when window is very narrow
  A number of small fixes for Link Previews
  Get rid of the white flash when the app starts up (#3083)
  v1.21.0-beta.3
  Lint fixes
  Introduce new language: NB
  Fail over to all numbers in retry if errors don't have numbers
  Use the proper method for pulling attachments off disk for retry
  Fix rendering bug with verified state in updateVerified()
  Update electron-builder and electron-updater
  Ensure that dialog pops up when permissions denied for voice note
  Lint fixes
  Large update to localization strings
  Link Previews
  Ensure that blocked messages are dropped even after sealed sender
  Don't linkify quoted message contents
  ...

# Conflicts:
#	.github/PULL_REQUEST_TEMPLATE.md
#	_locales/cs/messages.json
#	background.html
#	config/default.json
#	index.html
#	js/models/conversations.js
#	js/modules/web_api.js
#	js/settings_start.js
#	js/views/conversation_view.js
#	js/views/settings_view.js
#	package.json
#	protos/SignalService.proto
#	stylesheets/_index.scss
#	stylesheets/_settings.scss
6 years ago
Beaudan cde7bbf3c3 Removed forceP2p as argument for the pingContact event and enforced it on the other side 6 years ago
Beaudan 69ebf017ff Reworked loki_p2p_api to not use the window object, which means it needs to be instantiated after the storage is ready so that your pubkey can be passed in to the constructor. This makes it more modular and allows for easier testing 6 years ago
Scott Nonnenberg 0d7480bd92 A number of small fixes for Link Previews 6 years ago
Beaudan cd79d5aca5 Fixed and simplified some logic for the handling of loki address messages 6 years ago
Beaudan fac8e72861 Added queue manager to properly fix the race condition bug and reset the changes I made in other commit 6 years ago
Beaudan b2f456031f Forgot to lint 6 years ago
Beaudan 25383458b1 Fixed bug with our swarm nodes being removed from memory after a successful request because of returning a reference 6 years ago
Beaudan cc3f98b20a Move the incoming hash filtering logic into sql.js to prevent data races 6 years ago
Beaudan Campbell-Brown 5f49c5aafd
Merge pull request #165 from Mikunj/online-indicator
Online indicator
6 years ago
Mikunj 174f8747b6 Review fixes.
Revert promises back to old style.
6 years ago
sachaaaaa 576617e18e call class method using "this" in loki_snode_api 6 years ago
Mikunj 4518e95619 Linting 6 years ago
Mikunj f4e9bc655a Hooked up LokiP2pAPI with online stuff. 6 years ago
Beaudan 1ce63add68 Simplified the addContactP2pDetails logic cause it was silly 6 years ago
Beaudan a40a3d164f Lots of logic for establishing a p2p connection, managing when the other user is online vs offline etc. Will always try to use P2P messaging when it can and fall back to storage server otherwise 6 years ago
Mikunj efe95a70bc Fix review issues. 6 years ago
Mikunj 3c07d99a89 Fix variable names.
Fix module export to be more consistent.
6 years ago
Mikunj ddbbb1a6f0 Refactor fetch. 6 years ago
Beaudan 6ba7fb20b8 Fixed UI blocking when creating conversation, more review comments 6 years ago
Beaudan e735b3ca41 Review comments, moved swarmNodes database stuff to just be in data.js 6 years ago
Beaudan 4207d2d26b Removed accidental commented out line 6 years ago
Beaudan 38ff70e2ec Fixed some little redundant stuff in the message and snode api 6 years ago
Beaudan d002d76d9f Fix unneccesary logic and copy paste trash 6 years ago
Beaudan 07076c27ae Moved friend status to window, added start of p2p api stuff 6 years ago
Beaudan b417edfc9b Added new protos for online broadcast messages, added db hits for getting friends, local server now instantiated on the window, now sending online broadcast messages when the local server starts 6 years ago
sachaaaaa 8f165da43d Fix sending loop that cycles indefinitely when offline 6 years ago
Beaudan f6d167eda1 Split logic for getting swarm nodes from db, getting from lokinet and saving to db. Now tracking successfulRequests when making queries on top of the completedNodes list 6 years ago
Scott Nonnenberg 92c071e083 Use the proper method for pulling attachments off disk for retry 6 years ago
Beaudan 9ece4e1fd8 Review comments 6 years ago
Beaudan dde63a552f Fix bug with replayable errors, fix bug with set representation of swarmNodes not being handled properly 6 years ago
Beaudan c83661ce3f Added DNS resolution error for when lokinet isn't working, now keeping track of the nodes that have been queried and not trying them again 6 years ago
Beaudan 561d60cfd5 Sending messages now in a while loop like retrieving messages, added a failureCount and only delete node urls if they fail 3 times 6 years ago
Scott Nonnenberg 813924685e Link Previews 6 years ago
Mikunj 1a15ec9c15 Merge commit signal/master into signal-1.20 6 years ago
Mikunj e08a63d078 Merge development into lint 6 years ago
Beaudan badaf40ca8 bit of readability and catching error (but just silencing for now) 6 years ago
Beaudan bdbdf15469 Added timeouts for requests so they don't for ages. Changed swarmNodes to be a set to work property with merge, now removing contact swarmNodes if they timeout 6 years ago
Beaudan 24553e29e7 Made swarm requests ACTUALLY not wait for them all to finish and stop saving swarmNodes as DB column 6 years ago
Beaudan 7b1799c418 Big ol' hunk o' chunk. Now using random.snode to populate swarm lists, now making multiple requests from said lists and they are processed as they complete rather than waiting for all to resolve 6 years ago
Beaudan 37ba762312 First stuff for contacting specific nodes for each contact. Hard coded to hit the same bootstrap node for now plus doesn't handle unreachable nodes/errors well yet 6 years ago
Mikunj 6bd2d3962e Linted files 6 years ago
Mikunj 1f10a73e4f Updated strings. 6 years ago
Scott Nonnenberg 43e5d16020 Support for web socket communication with no signaling key 6 years ago
Scott Nonnenberg 985b1d6aa6 New staged attachments UI, multiple image attachments per message 6 years ago
Scott Nonnenberg e4babdaef0 Updates to backup infrastructure 6 years ago
Scott Nonnenberg 47f834cf5c Encrypt device name on account create, on first launch if needed 6 years ago
Mikunj 3690f4acda Added timeout argument to WorkerInterface. 6 years ago
Mikunj 654b0dac84 Merge signal-master. 6 years ago
Beaudan 6113f13d3a Rip the worker logic out of message_receiver and add the functionality for it to work with pow. Fix pow tests to work with those changes 6 years ago
Mikunj f53bec38a5 Added password inputs on registration screen.
Fix case where db is deleted but password hash still remains which causes user to never register.
Allow password to have symbols and other characters.
Added more tests.

Moved passHash from config into the sqlite db.
We can do this because we assume if sql failed to initialise then the key provided was wrong and thus we can show the user the password page.
6 years ago
Mikunj cb3599eea8 Removed IdentityKeyHeader. 6 years ago
sachaaaaa 8f22babfcc More log level finetuning 6 years ago
Scott Nonnenberg 313d08344a Request configuration sync on startup of new version 6 years ago
Mikunj f7e9af4e3a Reverse changes to contact.js 6 years ago
Mikunj 98c4b5d77b Added editing own nickname.
Fix dark theme support.
Fix notification titles.
6 years ago
Mikunj 774c52a407 Added dynamic profile fetching in conversation.
Added setting profile when sending DataMessage.
6 years ago
Scott Nonnenberg 70eed938d9 Store arrayBuffers in database for remote identity keys 6 years ago
Scott Nonnenberg 79a861a870 Typing Indicators 6 years ago
Beaudan b515fc41e7 Removed some repetetive logs, made the polling time a variable and lower the polling time and PoW difficulty if we are in debug mode 6 years ago
Mikunj 9fd822a7e3 Remove preKeys on friend request decline. 6 years ago
Mikunj 0dabce9e28 Remove preKeyBundle from message.
Always save preKeyBundles if we receive them.
Always override preKeys when saving.
6 years ago
sachaaaaa ccb5ff79d4 Use correct log level in development mode and use log.debug() for some of the reoccurring logs 6 years ago
Beaudan 489ec8fc65 Heap of linting, eslint warning/error removal, and fixed a couple small bugs found along the way
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
6 years ago
Mikunj 4148628e70 Remove any unsent messages when app is started. 7 years ago
Mikunj ece266fffd Added showing pow icon. 7 years ago
Mikunj 4b4999ac35 Update to signal 1.18.0 7 years ago
Scott Nonnenberg a780fa3bab Fix reference to nonexistent variable 7 years ago
Scott Nonnenberg ca4e2177b4 Fix reference to nonexistent variable 7 years ago
Scott Nonnenberg cb50451011 Bump sender certificate timer after registration for re-link 7 years ago
Mikunj 4d3fb17e61 Merge branch 'sig-development' into merge/signal 7 years ago
sachaaaaa 5bcf63e592
Merge pull request #39 from BeaudanBrown/last-hash
Last hash
7 years ago
Beaudan 3aa135fdb4 Grabbing last hash from server response. only requesting messages after the lasthash. Keeping track of lasthash for array of nodes (currently hardcoded for one) 7 years ago
Mikunj 3389b1d457 Fixed the way preKeyBundle is stored in message. 7 years ago
Scott Nonnenberg 55c3d9371e Bump sender certificate timer after registration for re-link 7 years ago
BeaudanBrown bd0ce981dd
Merge pull request #34 from sachaaaaa/classify
ES2015 classes for LokiServer and FallBackSessionCipher
7 years ago
Mikunj 33ee45b819 Cleaned up SQL for getMessagesByConversation. 7 years ago
Mikunj 1150f0f915 Allow fetching conversation messages by a specific type. 7 years ago
sachaaaaa ad1cf94526 ES2015 classes for LokiServer and FallBackSessionCipher 7 years ago
Mikunj 4b7a94c7d0 Merge branch 'development' into feature/friend-request 7 years ago
Beaudan d6534e1bb8 Fixed bug with signed key sig not being saved 7 years ago
Mikunj a80d6bb868 Merged branch correctly. 7 years ago
Mikunj 40fb7f726f Fixed incorrect variable used. 7 years ago
BeaudanBrown 9ceb3c8ac0
Merge branch 'development' into message-polling 7 years ago
Scott Nonnenberg 6300256a3e Gracefully shut down database operations before app exit 7 years ago
Scott Nonnenberg c5f9fae444 A few small bugfixes 7 years ago
Beaudan c59b196487 Now reading messages and adding them to conversations. Some cleaning of unreachable code. Modified the message data to be encoded as base64 string before sending to server
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
7 years ago
Mikunj 0a88f337d5 Merge branch 'sig-development' into merge/signal 7 years ago
Mikunj 5626cfe47d Added FriendRequest message 7 years ago
Scott Nonnenberg 2d48daa7b6 Refine Sealed Sender behaviors 7 years ago
Mikunj 2fabd93fd6 Fix message sending 7 years ago
Mikunj 77602e3dbb Moved contactPreKey and contactSignedPreKey to sql. 7 years ago
Mikunj f589fdac5c Merge signal changes into branch. 7 years ago
Beaudan 1ccf3b6b95 Added function to loki_message_api to do a single request call to storage server. Currently just gets called once when the application starts 7 years ago
Beaudan 519d372e63 Tiny url update to work with the storage server 7 years ago
Scott Nonnenberg fb670ad6b9 Remove IndexedDB files after removing IndexedDB database 7 years ago
Scott Nonnenberg 9f647f00d8 A couple fixes for the data layer, legacy message upgrade/migrate 7 years ago
Scott Nonnenberg 41dd78c073 On fetch of profileAvatar, set it to convo's profileAvatar field 7 years ago
Scott Nonnenberg 6628b73911 Only show database log entries if task takes longer than 10ms 7 years ago
Scott Nonnenberg 1755e0adfd Move all remaining stores to SQLCipher 7 years ago
sachaaaaa 4b9fcb98d4 Linting and other housekeeping stuff 7 years ago
Scott Nonnenberg 7aa9031c7f Import: Be resilient to deletions from importObject 7 years ago
Beaudan 4598fd222a Cleaned up newNonce stuff. Now doing target calculation with BigIntegers 7 years ago
Scott Nonnenberg a7d78c0e9b Sealed Sender support
https://signal.org/blog/sealed-sender/
7 years ago
Beaudan d4180b3ca6 Some syntax tidying up, plus fixed bug with message data not being a uint8array after IPC message 7 years ago
Scott Nonnenberg 2060118e85 Remove messages/conversations/unprocessed IndexedDB object stores 7 years ago
Scott Nonnenberg e39c999932 Import: Properly handle import with all empty non-convo stores 7 years ago
Scott Nonnenberg 1e562c8293 Properly handle avatar changes in group update messages 7 years ago
sachaaaaa 1cf8710127
Merge pull request #16 from sachaaaaa/friend_response
Handle prekeys in incoming friend request
7 years ago
sachaaaaa 9370e2b74a Merge branch 'master' of https://github.com/signalapp/Signal-Desktop into development
* 'master' of https://github.com/signalapp/Signal-Desktop: (38 commits)
  v1.17.0
  v1.17.0-beta.4
  Ensure that blue group avatars are preserved in dark theme
  Android theme: Incoming quotes take color from containing message
  Conversations have blue avatar backgrounds if no image provided
  Fix lint errors
  Add ca language
  inboxView: Ensure Conversation exists for our own number
  Ensure that file is not attached if we've filtered it
  v1.17.0-beta.3
  Localization updates
  v1.16.3
  Lint fixes
  Lint fixes
  Better handle large numbers of messages in cache on startup
  Keep object stores after conversations migrate to SQLCipher
  Longer timeout for orphaned file cleanup
  Tests and increase consistency for isFileDangerous calls
  Longer timeout for orphaned file cleanup
  v1.17.0-beta.2
  ...

# Conflicts:
#	background.html
#	package.json
7 years ago
Beaudan dfa8b59bc3 Using let and const properly, updated number to uint function, general cleaning 7 years ago
sachaaaaa 025d13a72b Add keyId index for contact prekeys and allow retrieving prekeys for a specific pubkey and keyid 7 years ago
Beaudan ee57c698d7 Client side proof of work attached to messages
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
7 years ago
sachaaaaa 886f47b8e7
Prekeys sending: first pass (#12)
* add 'recipient' attribute in prekey database to allow binding a prekey to a recipient pub key

* Attach a PreKeyBundleMessage to the ContentMessage in fallback encryption mode

* Skip generating 100 prekeys upon registration

* Store the signed key signature in database
7 years ago
Scott Nonnenberg 7532f397ea Keep object stores after conversations migrate to SQLCipher 7 years ago
Scott Nonnenberg 8edfbdcee5 Longer timeout for orphaned file cleanup 7 years ago
Scott Nonnenberg ca61c9cb85 Warnings for dangerous files 7 years ago
sachaaaaa 6fe70b9b85 Send outgoing messages as raw bytes (Uint8Array) and moved recipient & ttl to header 7 years ago
Scott Nonnenberg f38410976d Delete conversation external files on deletion 7 years ago
Scott Nonnenberg 2cfbfe477a Better handle large numbers of messages in cache on startup 7 years ago
Scott Nonnenberg a8e12d0771 Add user's avatar to the top left of the screen 7 years ago
Scott Nonnenberg cd60bdd08a Move conversations to SQLCipher 7 years ago
sachaaaaa 33ad509fbf Merge branch 'master' of https://github.com/signalapp/Signal-Desktop into development
# Conflicts:
#	_locales/ar/messages.json
#	_locales/es_419/messages.json
#	_locales/he/messages.json
#	_locales/hi/messages.json
#	_locales/hr/messages.json
#	_locales/kn/messages.json
#	_locales/ko/messages.json
#	_locales/mk/messages.json
#	_locales/sr/messages.json
#	_locales/uk/messages.json
#	_locales/vi/messages.json
#	package.json
7 years ago
Scott Nonnenberg d0c4152d99 backup.js: Remove references to nonexistent i18n strings 7 years ago
sachaaaaa a6b4215b1f changed sendMessage request from PUT to POST 7 years ago
sachaaaaa 8bb7185c7a make loki_message_api::sendMessage use async/await 7 years ago
sachaaaaa bb65115d7d Ensure the unique object id is stored in the object to facilitate deleting it later. 7 years ago
sachaaaaa 2f562ce9e1 Change contact prekeys in db to allow multiple entries for each contact 7 years ago
sachaaaaa 0832806bd9 wip: added helper to create mock contacts, almost got a session working 7 years ago
sachaaaaa 258a89bc21 create contactPreKeys and contactSignedPreKeys in database, with load/store helpers (rerun migrations required) 7 years ago
sachaaaaa e3cbf1caeb rename IndexedDB database to 'loki-messenger' 7 years ago
sachaaaaa b84ff76faf Fix error handling when sending message + clean up in loki_message_api 7 years ago
sachaaaaa 8ada6ce8ad serialize message as base64 7 years ago
sachaaaaa 1e14022e2f Add skeleton for Loki Message API. Wrap data in json (for now?) 7 years ago
sachaaaaa 1866aed432 Accomodate for upcoming signature in websocket connection header 7 years ago
sachaaaaa 187424f84a Change HTTP header from X-Signal-Agent to X-Loki-Messenger-Agent. 7 years ago
Scott Nonnenberg 57d13dad57 data/removeMessage: no need for additional model instantiation 7 years ago
Scott Nonnenberg 02fbea96c0 Move base64 conversions off of the main thread 7 years ago
Scott Nonnenberg 911bc63c67 Move all arrayBuffer<->base64 functions to be async 7 years ago
Scott Nonnenberg 9f920aa35b Re-enable orphaned attachment cleanup 7 years ago
Scott Nonnenberg fedfbed304 Copy quoted message contents into quote on receipt
Also:
  - visually distinguish any reference we couldn't verify on receipt
  - show toast on quote click if we can't scroll to message
  - toast visuals redesigned to match rest of app
7 years ago
Scott Nonnenberg 516a729a45 Additional logging for sql commands in debug mode 7 years ago
Scott Nonnenberg 7983300f4a Use base64 strings for incoming message cache instead of binary 7 years ago
Scott Nonnenberg 8c8475076b Data layer: return null if id not in database, not empty model 7 years ago
Scott Nonnenberg c88df69094 New SQL indices and query tweaks to eliminate table scans
Also: New logging on client side to track performance of db queries
7 years ago
Scott Nonnenberg e086d521f1 Increase the timeout for database updates 7 years ago
Scott Nonnenberg 727925a266 Clean up old messages, better handle errors from sending 7 years ago
Scott Nonnenberg 6e193456f9 Eliminate orphaned external message files on startup
Attachments, visual attachment thumbnails, video attachment screenshots
Quote thumbnails
Contact avatars
7 years ago
Scott Nonnenberg 44dec45995 Ensure that all messages in cache are migrated properly 7 years ago
Scott Nonnenberg a01db40e27 Ensure that a SQL command timeout results in an error 7 years ago
Scott Nonnenberg 22613c8cc4 Set disappearing check timer reliably - on all message saves 7 years ago
Scott Nonnenberg 3961778e53 Fixes for Chrome app import in this new SQLCipher world 7 years ago
Scott Nonnenberg 1d7987108b Show and log progress during the SQLCipher migration 7 years ago
Scott Nonnenberg b1c6a5fe19 When updating message schema pre-SQLCipher, use legacy save 7 years ago
Scott Nonnenberg 0d13d437fe Delete before forced bulk insert to fix broken migrations 7 years ago
Scott Nonnenberg 3105b77475 Migrate to SQLCipher for messages/cache
Quite a few other fixes, including:
  - Sending to contact with no avatar yet (not synced from mobile)
  - Left pane doesn't update quickly or at all on new message
  - Left pane doesn't show sent or error status

Also:
 - Contributing.md: Ensure set of linux dev dependencies is complete
7 years ago
Scott Nonnenberg 02675312c5 Introduce mandatary migration on startup, to minimum version 7 years ago
Scott Nonnenberg f39a96bc76 Move to centralized message/cache data layer
Also, ensure that conversation.messageCollection has nothing in it
unless it has an associated ConversationView.
7 years ago
Scott Nonnenberg 34231168a7 On message delete, ensure that all external files are deleted 7 years ago
Scott Nonnenberg 573a26021b file_input_view: Use makeVideoThumbnail on attach of video 7 years ago
Scott Nonnenberg 5933a34a18 Use window.log in browser context, turn on console eslint rule 7 years ago
Scott Nonnenberg cea38b7bc4 Log clear error if we fail to retrieve debug log upload key 7 years ago
Scott Nonnenberg 2ef2235317 Show error if debug log upload fails 7 years ago
Scott Nonnenberg 4ca674edb2 Remove User-Agent from form to upload debug log 7 years ago
Scott Nonnenberg b159a8d7c7 Update the user agent for debug log requests 7 years ago
Scott Nonnenberg 675e34fc8d New React component: ConversationListItem, installed in left pane
When collecting a conversation's last message, we grab that message's
status as well (if outgoing) and show it.
7 years ago
Scott Nonnenberg 3c69886320 Finish new Message component, integrate into application
Also:
- New schema version 8 with video/image thumbnails, screenshots, sizes
- Upgrade messages not at current schema version when loading messages
  to show in conversation
- New MessageDetail react component
- New ConversationHeader react component
7 years ago
Scott Nonnenberg dc11db92f9 New React component: Message
Also: Use react to render contects on the 'show group members' screen
7 years ago
Scott Nonnenberg ad4387803b New media permission, show dialog when not enabled for voice msg
UI now in separate renderer:
  - the permissions popup
  - settings dialog
  - debug log dialog
  - about window

Couple bug fixes:
  - About Window: Fix 'escape' to close window
  - Remove outdated dist/copy tasks from Gruntfile

Eslintified settings_view.js
7 years ago
Scott Nonnenberg 125c3fafa8
Idle detector: Fix bug preventing it from ever turning off (#2487) 7 years ago
Scott Nonnenberg 8eeaad8e18 Remove unused export/import functionality 7 years ago
Scott Nonnenberg f3bd0cf903 Refactor api.js into web_api, which encapsulates all web access 7 years ago
Scott Nonnenberg 34f423b52c Remove unused code; move signal.js to js/modules for eslint
(noticed as I was doing this that signal.js doesn't get eslint coverage)
7 years ago
Scott Nonnenberg e2d044e02b Filter file scheme; disable http, https and ftp entirely 7 years ago
Scott Nonnenberg 80b069e9b6 Move phone number format/parse into ts/types/PhoneNumber 7 years ago
Scott Nonnenberg aa13a2c6f7 Parse phone numbers into e164 as part of schema upgrade 7 years ago
Scott Nonnenberg d2293d9592 parseAndWriteAvatar: Do shallow copy before omit() call
Otherwise, we get all prototype props/functions, which we can't save in IndexedDB
7 years ago
Daniel Gasienica 3bf8a8966a Notification improvements
- Remove on read, on focus, and on exit.
- Show multi-message notifications like '5 new messages'.
7 years ago
Daniel Gasienica 16bc1d34c6 Message schema 6: Change classification of media and documents
For an easier implementation, we change our original definition of
`initializeAttachmentMetadata`. This means we have to re-run it marked as
version 6 and mark schema version 5 as deprecated as its definition has changed.
7 years ago
Daniel Gasienica 101041f106 Derive `Message.CURRENT_SCHEMA_VERSION` 7 years ago
Scott Nonnenberg 26be658892 Remove 'Contact' from 'Contact.*' properties, clean->parse 7 years ago
Scott Nonnenberg cda326ca45 Use protobuf enum values to eliminate magic numbers 7 years ago
Scott Nonnenberg adbe989949 validateContact: Return error instead of logging 7 years ago
Scott Nonnenberg d0efccd121 A couple renames in contact.js 7 years ago
Scott Nonnenberg 420f81ebcd Move contact migrate code from message.js to contact.js 7 years ago
Scott Nonnenberg 37821e5a1b Wire up all contact behaviors, refactor Contact type/selector 7 years ago
Scott Nonnenberg 3ea3e4e256 Contact sharing: protos and data pipeline
As of this commit: 82b76ccf37
7 years ago
Daniel Gasienica a86056630f Use `Attachment.isVoiceMessage` 7 years ago
Daniel Gasienica 5c8f734e67 Remove newlines from group IDs 7 years ago
Daniel Gasienica a102016ed8 Port `Settings` and `OS` to TypeScript 7 years ago
Scott Nonnenberg 754d65ae2e Let's make it all pretty, shall we?
We missed a couple directories with previous attempts to turn this on
globally: app/ and libtextsecure/

Not to mention files in places we didn't expect: ts files that weren't
in the ts directory!

This turns prettier on for every file we care about (js, ts, tsx, md)
everywhere in the project but for a few key parts.
7 years ago
Daniel Gasienica 6eca5ee940 Document that JPEG auto-orient strips EXIF metadata 7 years ago
Daniel Gasienica 1dd87ad197 Format all source code using Prettier 7 years ago
Daniel Gasienica e4baf27fa7 Increase migration conversion speed by a factor of 3x 7 years ago
Daniel Gasienica d00fb560b0 Avoid exposing `AttachmentTS` 7 years ago
Daniel Gasienica f36f206a01 Use `IndexablePresence` for `hasFileAttachments` and `hasVisualMediaAttachments`
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
7 years ago
Daniel Gasienica 8e3c38d5fe Fix formatting 7 years ago
Daniel Gasienica 146178f977 Update schema documentation 7 years ago
Daniel Gasienica 082ef98a56 Add type definition for `deferredToPromise` 7 years ago
Daniel Gasienica 9d84b2f420 Index messages with attachments using a boolean
When indexing message attachment metadata using numeric indexes such as:

```javascript
{
  conversationId: '+12223334455',
  received_at: 123,
  attachments: […],
  numAttachments: 2,
},
{
  conversationId: '+12223334455',
  received_at: 456,
  attachments: [],
  numAttachments: 0,
}
{
  conversationId: '+12223334455',
  received_at: 789,
  attachments: [],
  numAttachments: 1,
}
```

It creates an index as follows:

```
[conversationId, received_at, numAttachments]
['+12223334455', 123, 2]
['+12223334455', 456, 0]
['+12223334455', 789, 1]
```

This means a query such as…

```
lowerBound: ['+12223334455', 0,                1               ]
upperBound: ['+12223334455', Number.MAX_VALUE, Number.MAX_VALUE]
```

…will return all three original entries because they span the `received_at`
from `0` through `Number.MAX_VALUE`. One workaround is to index booleans using
`1 | undefined` where `1` is included in the index and `undefined` is not, but
that way we lose the ability to query for the `false` value. Instead, we flip
adjust the index to `[conversationId, hasAttachments, received_at]` and can
then query messages with attachments using

```
[conversationId, 1 /* hasAttachments */, 0                /* received_at */]
[conversationId, 1 /* hasAttachments */, Number.MAX_VALUE /* received_at */]
```
7 years ago