Commit graph

876 commits

Author SHA1 Message Date
sachaaaaa
adfb4ab371 work with session reset 2019-01-23 17:39:49 +11:00
sachaaaaa
b080828065 Fix bug where a friend request notification is shown when a session reset is received 2019-01-23 17:04:50 +11:00
sachaaaaa
1238cbc4e6 Send profile along with friend request accept message 2019-01-23 14:58:28 +11:00
Mikunj
1a15ec9c15 Merge commit signal/master into signal-1.20 2019-01-22 13:54:03 +11:00
Mikunj
9b71e8119e Added error catching. 2019-01-22 10:40:07 +11:00
Mikunj
f21d1f65e6 Let OS select random open port. 2019-01-21 15:44:37 +11:00
Mikunj
8c9b1a7a7a Added loki server.
Added test.
2019-01-21 15:23:20 +11:00
Mikunj
e08a63d078 Merge development into lint 2019-01-17 12:58:33 +11:00
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 2019-01-16 17:08:46 +11:00
Mikunj
6bd2d3962e Linted files 2019-01-16 16:18:08 +11:00
Scott Nonnenberg
aab2a57b48 Some style and interaction fine-tuning 2019-01-14 17:40:31 -08:00
Scott Nonnenberg
43e5d16020 Support for web socket communication with no signaling key 2019-01-14 10:32:12 -08:00
Scott Nonnenberg
00755072ee Include caption, width and height for outgoing attachments 2019-01-14 10:32:12 -08:00
Mikunj
8f1650443f Set custom TTL in outgoing message. 2019-01-14 09:56:16 +11:00
Mikunj
070d18b514 Updated function calls. 2019-01-10 10:26:25 +11:00
Scott Nonnenberg
985b1d6aa6 New staged attachments UI, multiple image attachments per message 2019-01-04 12:21:26 -08:00
Scott Nonnenberg
47f834cf5c Encrypt device name on account create, on first launch if needed 2019-01-04 12:21:26 -08:00
Mikunj
a0b814bf7c limit max message length to 2000 characters.
Set task time limit to 3 minutes.
2018-12-19 14:05:57 +11:00
Mikunj
6bcb259919 Added PoW error. 2018-12-19 14:05:57 +11:00
Mikunj
654b0dac84 Merge signal-master. 2018-12-17 12:56:04 +11:00
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 2018-12-13 17:13:52 +11:00
Mikunj
0491ceacf1 Added seed dialog.
Fixed issue where incorrect language was used to generate seed.
2018-12-12 11:27:41 +11:00
Scott Nonnenberg
3851bf351f Throttle typing events, fix profile logging, fix group typing 2018-12-10 14:06:43 -08:00
Beaudan
7782c58d14 Slight refactor of PoW file to make easier to test plus some tests for the PoW functionality 2018-12-10 14:13:54 +11:00
Beaudan
be878f00a4 Updated names of some test functions. Added yarn commands to view output of different tests. Added a test and updated existing test to use more efficient asserts 2018-12-10 14:13:54 +11:00
Beaudan
a676459229 Added test for returning the correct prekeybundle after creating a contact, updated the in memory store to reflect how sasha updated the actual store a while ago 2018-12-10 14:13:54 +11:00
Beaudan
c93aff7ebe Setup grunt/yarn etc for loki tests plus wrote first 2 simple libloki-protocol tests 2018-12-10 14:13:54 +11:00
Mikunj
2715e79268 Fix conversation status not being reset upon conversation messages deletion.
Fix incoming friend request not replacing old friend requests.
Fixed incorrect function name.
2018-12-10 13:23:50 +11:00
sachaaaaa
05c18d42db
Merge pull request #66 from sachaaaaa/session_reset
Handle session reset, Loki style
2018-12-06 15:24:52 +11:00
Beaudan
1e3886cca8 More consistent naming of key storage functions, moved some loki messenger only functions into new file 2018-12-06 12:28:00 +11:00
sachaaaaa
91f018da57 remove unused var 2018-12-06 12:19:36 +11:00
sachaaaaa
f2e1b9b8de more missing awaits 2018-12-06 12:10:24 +11:00
sachaaaaa
933d7730db Remove superfluous commented out line 2018-12-06 12:10:24 +11:00
sachaaaaa
7e612700f7 Handle session reset, Loki style 2018-12-06 12:10:24 +11:00
Mikunj
62c802445b Allow generating mnemonic for different languages. 2018-12-05 12:03:40 +11:00
Mikunj
85298012e4 Added generation of seed in registration. 2018-12-04 15:31:59 +11:00
Beaudan
28fc5793a7 More explicit function names, shifted friend request sent logic to more sensible place 2018-12-03 16:45:51 +11:00
Beaudan
91a8a82e39 More PR suggestions, now recover from early exit before friend request is sent 2018-12-03 16:45:03 +11:00
Beaudan
2de01d0343 Back to multiple pending states, fix some notification bugs and friend requests should now work for all cases besides message sending interruption 2018-12-03 16:44:10 +11:00
Beaudan
051e4dd22c XAnother big refactor to tie conversation UI logic to the friendRequestStatus variable 2018-12-03 16:44:10 +11:00
Mikunj
c10e81355d Moved profile name saving to account manager. 2018-12-03 12:54:19 +11:00
Mikunj
06f79eb3fd Allow user to set display name when registering. 2018-12-03 08:55:43 +11:00
Scott Nonnenberg
822ea9ae53 Improve sealed sender icon display logic 2018-11-29 15:41:26 -08:00
sachaaaaa
f900fc496d
Merge pull request #61 from Mikunj/feature/profile-nickname
Added profile sharing and setting nicknames.
2018-11-29 15:59:53 +11:00
Mikunj
f596c8125a Only attach profile if name is set. 2018-11-29 15:49:35 +11:00
Scott Nonnenberg
313d08344a Request configuration sync on startup of new version 2018-11-28 12:35:26 -08:00
Mikunj
18d638fdbf Fix sending and receiving profile.
Don't delete profile after if we set the display name to empty.
2018-11-28 14:08:25 +11:00
Beaudan
fa63ce5ade Review changes 2018-11-28 13:16:50 +11:00
Beaudan
35c89ea4d9 Big refactor, prekeybundle moved back to a content message 2018-11-28 12:10:44 +11:00
Mikunj
14ee7fec65 Moved and nicknames into conversations. 2018-11-28 10:31:11 +11:00
Mikunj
aa57693fce Update profile if we get it through a message. 2018-11-28 10:31:11 +11:00
Mikunj
774c52a407 Added dynamic profile fetching in conversation.
Added setting profile when sending DataMessage.
2018-11-28 10:31:11 +11:00
Beaudan
7c92eeac30 Fixing cache clearing bug 2018-11-27 16:29:45 +11:00
Scott Nonnenberg
70eed938d9 Store arrayBuffers in database for remote identity keys 2018-11-26 16:22:49 -08:00
Scott Nonnenberg
79a861a870 Typing Indicators 2018-11-26 15:26:04 -08:00
Scott Nonnenberg
99252702e1 Support receiving multiple images in one messages 2018-11-26 15:26:04 -08:00
sachaaaaa
4309a10ebc
Merge pull request #60 from BeaudanBrown/develop-mode-settings
Removed some repetetive logs, developer mode settings
2018-11-26 16:51:23 +11:00
sachaaaaa
b03548637c Fix getKeysForNumber when staleDevices is not empty 2018-11-26 16:18:24 +11:00
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 2018-11-26 16:01:13 +11:00
Beaudan
b65d6a6d2c Refactor friend request status to use a state enum variable 2018-11-26 11:28:43 +11:00
sachaaaaa
7e783639fd Fix inexistent enum value for Prekey Type 2018-11-23 17:46:26 +11:00
Mikunj
9fd822a7e3 Remove preKeys on friend request decline. 2018-11-23 12:25:44 +11:00
Mikunj
0dabce9e28 Remove preKeyBundle from message.
Always save preKeyBundles if we receive them.
Always override preKeys when saving.
2018-11-23 11:09:47 +11:00
Mikunj
149da3374a Fix pkb not being saved on the first cipher message. 2018-11-23 10:59:10 +11:00
Mikunj
0404f42738 Merge commit 'dbdd52b4eb11ca71adcae547c931b5cfda1ada11' into fix/pkb-type 2018-11-22 16:10:51 +11:00
sachaaaaa
dbdd52b4eb
Merge pull request #50 from Mikunj/fix/friend-request
Friend request fixes
2018-11-22 16:06:41 +11:00
Mikunj
05f8a1c43a Handle pkb friend request accept. 2018-11-22 15:39:49 +11:00
Mikunj
4bb93e6e3c rename sendEmptyMessageWithPreKeys to sendFriendRequestAccepted. 2018-11-22 15:18:10 +11:00
Mikunj
bd15f426f9 Attack a type to preKeyBundleMessage. 2018-11-22 15:15:28 +11:00
Mikunj
f29a515fdf Fix up typos. 2018-11-22 14:52:32 +11:00
Mikunj
8a0b8e1f00 Store the state of the friend request inside the conversation. 2018-11-22 13:59:03 +11:00
Mikunj
484efd34a3 Added friend request message expiration. 2018-11-22 13:37:22 +11:00
Mikunj
db1145c0ce Fix handling empty content. 2018-11-21 15:37:19 +11:00
sachaaaaa
ccb5ff79d4 Use correct log level in development mode and use log.debug() for some of the reoccurring logs 2018-11-21 15:06:22 +11:00
Mikunj
dba6a36e83 removed old unused code. 2018-11-21 12:38:01 +11:00
Mikunj
75219966a7 Fixed preKeyBundle decryption. 2018-11-21 11:29:48 +11:00
Mikunj
b21a7197f7 Fix preKeyBundle not sending. 2018-11-20 16:20:57 +11:00
Mikunj
110387508f UI fixes. 2018-11-20 16:01:37 +11:00
Mikunj
4ebdfab633 Update handling of new message logic. 2018-11-20 15:08:29 +11:00
Mikunj
6c5c95d956 Added preKey decryption. 2018-11-20 14:44:48 +11:00
Mikunj
1264630649 Attach preKeyBundle outside of the message content. 2018-11-20 14:23:06 +11:00
Mikunj
cf3e9716ed Update new conditions for friend accepted and key exchange complete in conversations model. 2018-11-20 14:07:10 +11:00
Beaudan
ff3cc7a315 Review changes 2018-11-20 11:02:02 +11:00
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
2018-11-19 18:01:13 +11:00
sachaaaaa
78d39ac177
Merge pull request #41 from Mikunj/fix/friend-notification
Friend Notifications
2018-11-16 14:16:23 +11:00
Mikunj
17e5c861a1 Fixed review issues.
Fixed lint error.
2018-11-16 13:35:50 +11:00
sachaaaaa
82a09d46d7
Merge pull request #42 from sachaaaaa/restore_padding
restore ciphertext padding
2018-11-16 11:58:44 +11:00
Mikunj
ece266fffd Added showing pow icon. 2018-11-15 14:06:07 +11:00
sachaaaaa
847401e49a restore ciphertext padding 2018-11-15 12:35:46 +11:00
sachaaaaa
9f101d9381
Merge pull request #40 from Mikunj/merge/signal
Merge Signal 1.18.0
2018-11-15 12:15:31 +11:00
Mikunj
745d0e82d4 Added unread count badge . 2018-11-15 12:01:25 +11:00
sachaaaaa
5a428af873 Restore incoming Signal decryption to fix 'Illegal wire type for field Message.Field .signalservice.Content.preKeyBundleMessage' 2018-11-15 09:15:42 +11:00
Mikunj
c0a21f60c0 Fix function issue. 2018-11-14 15:59:18 +11:00
sachaaaaa
4a31c1640f Missing callback argument for recursive calls in http-resources 2018-11-14 15:52:28 +11:00
sachaaaaa
dc0a70b6d0 fix copy/pasta mistake 2018-11-14 15:41:38 +11:00
Mikunj
4d3fb17e61 Merge branch 'sig-development' into merge/signal 2018-11-14 15:06:46 +11:00
sachaaaaa
6c6b0a4b92
Merge pull request #37 from sachaaaaa/fix_network_status_warning
Make network status warning work with HTTP polling
2018-11-14 14:54:26 +11:00
sachaaaaa
5bcf63e592
Merge pull request #39 from BeaudanBrown/last-hash
Last hash
2018-11-14 14:22:11 +11:00
Beaudan
9731c9e086 Comment out some signal server based code causing errors. Return before trying to unpad message because they aren't being padded in the first place 2018-11-14 13:20:18 +11:00
Mikunj
245ae721c7 Fix checking for when a friend request was accepted. 2018-11-14 13:08:21 +11:00
Mikunj
3389b1d457 Fixed the way preKeyBundle is stored in message. 2018-11-14 13:08:21 +11:00
Mikunj
688f275262 pass in source, sourceDevice, timestamp and receivedAt when adding a friend request. 2018-11-14 13:08:21 +11:00
sachaaaaa
7e9016f510 Make network status warning work with HTTP polling 2018-11-14 11:41:47 +11:00
BeaudanBrown
bd0ce981dd
Merge pull request #34 from sachaaaaa/classify
ES2015 classes for LokiServer and FallBackSessionCipher
2018-11-13 16:35:01 +11:00
sachaaaaa
ad1cf94526 ES2015 classes for LokiServer and FallBackSessionCipher 2018-11-13 15:03:06 +11:00
Mikunj
f4b60c3ff6 Fix setting friend requests incorrectly. 2018-11-13 14:38:18 +11:00
Mikunj
6aab900da2 Handle friend request updated. 2018-11-13 13:46:53 +11:00
Mikunj
757216fe80 Fix text input disabling. 2018-11-13 13:46:53 +11:00
Mikunj
fc3cb9c46d Replace old pending messages with new one when adding a new incoming friend request.
More refactoring.
2018-11-13 13:41:32 +11:00
Mikunj
d5fafd4d78 refactor friend request message props 2018-11-13 13:41:32 +11:00
Mikunj
a80d6bb868 Merged branch correctly. 2018-11-13 13:41:21 +11:00
BeaudanBrown
9ceb3c8ac0
Merge branch 'development' into message-polling 2018-11-13 11:18:52 +11:00
Scott Nonnenberg
2822f4ce40 Ensure proper order of state changes during account create 2018-11-12 15:31:17 -08:00
Scott Nonnenberg
c5f9fae444 A few small bugfixes 2018-11-12 15:31:17 -08:00
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
2018-11-13 10:13:19 +11:00
Mikunj
0cf616328e Fixed saving prekey bundle once friend request is accepted.
Added option to delete conversation after it is declined.
2018-11-12 11:02:08 +11:00
Mikunj
0a88f337d5 Merge branch 'sig-development' into merge/signal 2018-11-12 10:06:34 +11:00
Mikunj
c150cbe34f Friend request message indicator. 2018-11-12 09:22:05 +11:00
Mikunj
b9e85bb141 Added handling of accept and decline events. 2018-11-09 15:28:33 +11:00
Mikunj
1bef7a0c98 Modified createAccount to only accept params needed for Loki Messenger.
Removed implementation of registerSecondDevice.
2018-11-09 10:28:55 +11:00
Mikunj
b63844af57 Fix registration. 2018-11-08 12:39:48 +11:00
Scott Nonnenberg
e828253ef0 Restor full function syntax to custom Mocha reporter 2018-11-07 16:53:41 -08:00
Scott Nonnenberg
dbf0be2db5 eslintify all test files 2018-11-07 16:34:38 -08:00
Scott Nonnenberg
2d48daa7b6 Refine Sealed Sender behaviors 2018-11-07 16:34:20 -08:00
Mikunj
2fabd93fd6 Fix message sending 2018-11-08 11:03:11 +11:00
Mikunj
77602e3dbb Moved contactPreKey and contactSignedPreKey to sql. 2018-11-08 09:48:49 +11:00
Mikunj
f589fdac5c Merge signal changes into branch. 2018-11-07 15:26:37 +11:00
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 2018-11-07 11:49:56 +11:00
Scott Nonnenberg
e2e0e4c96b Refine sealed sender logic 2018-11-01 17:00:24 -07:00
sachaaaaa
dda71cbea1 always lock editor after sending friend request. unlock if error. 2018-11-01 17:07:07 +11:00
Scott Nonnenberg
1755e0adfd Move all remaining stores to SQLCipher 2018-10-31 17:36:51 -07:00
sachaaaaa
4b9fcb98d4 Linting and other housekeeping stuff 2018-11-01 11:10:30 +11:00
sachaaaaa
7b1fbe362e Allow choosing language for mnemonic seed 2018-10-31 15:18:48 +11:00
sachaaaaa
bbabeb34b8
Merge pull request #18 from sachaaaaa/mnemonic
Allow registering using a mnemonic word list
2018-10-31 13:56:16 +11:00
sachaaaaa
68c98e0f6f
Merge pull request #20 from sachaaaaa/friend_request_prompt
Friend request prompt
2018-10-31 13:50:16 +11:00
sachaaaaa
666cb1d3cb replace double with triple equals 2018-10-31 13:39:09 +11:00
Scott Nonnenberg
a7d78c0e9b Sealed Sender support
https://signal.org/blog/sealed-sender/
2018-10-29 14:49:18 -07:00
sachaaaaa
13858dfa66 yarn.lock and fix missing variable in transmission error handling 2018-10-26 10:12:26 +11:00
sachaaaaa
3481c0e58f send back an empty message with prekeys upon accepting a friend request 2018-10-25 15:29:32 +11:00
sachaaaaa
e1ffe582c3 Prompt user when an incoming friend request is received 2018-10-25 15:18:32 +11:00
sachaaaaa
143b1e883d
Merge pull request #17 from sachaaaaa/lock_input_friend_request
Lock input after friend request is sent
2018-10-25 10:47:38 +11:00
sachaaaaa
68e15d60b1 Convert privKey to ArrayBuffer before generating key pair 2018-10-25 10:45:54 +11:00
sachaaaaa
1ce29d77c3 Moved mnemonic to node side. Added sc_reduce32 (asm) to generate privkey. Moved mnemonic languages to separate files. 2018-10-24 17:04:54 +11:00
sachaaaaa
1cf8710127
Merge pull request #16 from sachaaaaa/friend_response
Handle prekeys in incoming friend request
2018-10-24 16:57:20 +11:00
sachaaaaa
a418a9d23b allow registering using a mnemonic word list (seed used as privKey for now) 2018-10-24 10:13:54 +11:00
Beaudan
d9c89376cb Added logic to pass tll into transmitMessage function, with default value of 24 hours.
TODO: ensure that the target calculation for the PoW is adjusting appropriately for the different ttl values.
2018-10-23 15:54:44 +11:00
Beaudan
9d8890594c Removed unused retransmit function 2018-10-23 15:52:04 +11:00
sachaaaaa
fb020f88ea call 'onFriendRequestSent' only after the message was successfully sent 2018-10-23 15:40:59 +11:00
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
2018-10-23 13:32:08 +11:00
sachaaaaa
93f1534512 Save prekeys upon reception of friend request. Add function to send an empty message as friend request acceptance 2018-10-19 11:00:32 +11:00