Commit Graph

3136 Commits

Author SHA1 Message Date
gmbnt
4f1beeaa88
Merge pull request #39 from loki-project/multi-device-stage-2
[Stage 2] Multi device
2019-11-15 16:25:56 +11:00
Niels Andriesse
30df89ea58 Fix critical issues 2019-11-15 16:24:58 +11:00
ryanzhao
ed2dfdbf68 remove the commented out code 2019-11-15 15:47:46 +11:00
Mikunj
463aaf0fb8 Fix processing of outgoing attachment messages in public chats.
Before we were directly inserting messages into the database but that wasn't working because attachments never got downloaded. This fixes it so we forcefully go through signals pipeline via self sync messages.
2019-11-15 11:44:12 +11:00
Mikunj
848cab8677 Handle incoming messages from our other devices in public chats. 2019-11-15 09:58:13 +11:00
Mikunj
55ea9869a8 Hook up http cache to LokiDotNetAPI. 2019-11-15 09:33:30 +11:00
ryanzhao
9ed5ebab6d Update ConversationFragement.java with the change of server. Use List instead of Array. Delete the converting codes. 2019-11-15 09:27:14 +11:00
ryanzhao
4837c520e3 multiple deletion frontend 2019-11-14 13:14:09 +11:00
Mikunj
d1289ec7bd Refactoring. 2019-11-14 12:00:46 +11:00
Mikunj
44ccc66ec2 Fix multi-device media messages.
This fixes the issue of the same attachments being uploaded multiple times per linked device. Now we only upload the attachments once and then we send the media message.
2019-11-14 10:44:55 +11:00
Mikunj Varsani
a90b0e70f5 Fix conversation input. 2019-11-13 16:05:37 +11:00
Mikunj Varsani
9c243eed75 Correctly redirect typing messages and receipts.
Send an accept message back after becoming friends with a contact during contact sync.
2019-11-13 14:53:42 +11:00
Mikunj Varsani
41e0934dd4 Only update thread friend request status on message send if we haven't sent a previous request.
Always send self sync messages to our primary device.
Cache conversation input enabled so that subsequent calls don't cause it to flicker.
2019-11-13 12:28:17 +11:00
Mikunj Varsani
5c1ec4c06d Fix contact sync caused decryption lock to never release.
Fix message
2019-11-13 11:32:33 +11:00
Mikunj
7c4e7f261d Fix contact sync message parsing in pairing authorisation. 2019-11-12 16:30:28 +11:00
Mikunj
039df379cc Fix minor UI 2019-11-12 08:33:54 +11:00
Mikunj Varsani
12639b491f Sync all contacts with only a specific device.
This may fix the issue where the sync message sending queue gets blocked because of sending full contact syncs to all devices.
2019-11-11 14:11:32 +11:00
Mikunj
aea686c856 Only handle friend requests for direct chats. 2019-11-08 10:38:17 +11:00
Mikunj
55ecd3cae4 Add a job for sending a background message.
Send a friend request background message to other linked devices upon accepting a friend request.
2019-11-08 10:20:11 +11:00
Mikunj
9541588383 Fix up syncing all contacts.
We were looking up contact from the phone book which we had no access to.
2019-11-06 16:08:34 +11:00
Mikunj
ddafcf4530 Fix device linking blocking UI 2019-11-06 16:08:34 +11:00
Mikunj
ce265f29fd Handle received contact sync message 2019-11-06 16:08:34 +11:00
Mikunj
6f2a6f7f94 Sync contact upon accepting friend request 2019-11-06 16:08:34 +11:00
Mikunj
7df3393e23 Sync contacts upon pairing a secondary device. 2019-11-06 16:08:34 +11:00
Mikunj
92580a0dd9 Fixed up contact sync sending to use the correct field in protobuf. 2019-11-06 16:08:34 +11:00
Mikunj
96fa96f5c1 Fix sync message sending. 2019-11-06 16:08:20 +11:00
Mikunj
ed6ca6a64a We should automatically become friends with a contact if we are friends with one of their other devices. 2019-11-06 13:40:55 +11:00
Mikunj
b8818cbce4 Fix quotes in public group chats 2019-11-04 08:44:19 +11:00
Mikunj
c223e087f6 Don't block thread when retrying. 2019-11-01 15:49:26 +11:00
Mikunj
789aa244b5 Use promises instead of blocking the thread. 2019-11-01 14:29:43 +11:00
Mikunj
f6b039ee77 Disabled unused permissions 2019-10-31 16:09:29 +11:00
Mikunj
bdc0ed36eb Process public chat messages in a background thread and not the promise thread. 2019-10-31 13:20:07 +11:00
Mikunj
d7571d237a Skip friend request handling if we received a group message. 2019-10-31 12:12:20 +11:00
Mikunj
31ad7a40de Stop main thread from being blocked.
Refactoring.
2019-10-31 11:36:52 +11:00
Mikunj
4072f506b5 Oops. 2019-10-30 15:53:23 +11:00
Mikunj
15f7e5ab37 Don't send an empty message body when sending a background message. 2019-10-30 10:56:17 +11:00
Mikunj
359363184a More cleanup. 2019-10-30 10:13:19 +11:00
Mikunj
7ff7c36e27 Cleanup code. 2019-10-30 09:59:11 +11:00
Mikunj
3298d665e9 Fix note to self message syncing.
Don't send messages if we're sending to ourselves, instead we just send a regular sync message.
2019-10-29 14:29:09 +11:00
Mikunj
10ec395915 Correctly update UI when an outgoing friend request is accepted from a secondary device. 2019-10-29 12:13:22 +11:00
Mikunj
9ea2a6c8e4 More fixes for friend request UI for multi device.
Remove old FR pending states on new incoming friend request.
Always update the last friend request message state and not a new message.
2019-10-29 11:27:08 +11:00
Mikunj
09f5f50af4 Don't render friend requests if we are already friends with a users linked device. 2019-10-29 10:06:01 +11:00
Mikunj
26800cba82 Send a background message to all devices upon manually accepting a friend request. 2019-10-25 15:21:19 +11:00
Mikunj
efad14fcdc Message syncing. 2019-10-25 14:08:30 +11:00
Mikunj
98cfd93b97 Enable note to self.
Fix note to self crashing.
2019-10-24 15:38:13 +11:00
Mikunj
bb0ac32540 Correctly reset prekeys for linking. 2019-10-24 14:17:12 +11:00
Mikunj
94a9303d7a Fix multi-device ui 2019-10-24 13:35:14 +11:00
Mikunj
24ae0c640b Handle friend requests correctly. 2019-10-24 12:17:58 +11:00
Niels Andriesse
9fc43cb16d Enable incognito keyboard by default 2019-10-24 10:38:51 +11:00
Mikunj
1c1685ae9d Fix multidevice.
Fix authorisation grant not being sent.
2019-10-24 10:30:53 +11:00
Mikunj
d58364c9b0 Disable input if we have a pending request to any other linked device and we're not friends with any of them 2019-10-23 15:31:58 +11:00
Mikunj
f24b191164 Re-enable multi-device 2019-10-23 15:31:58 +11:00
Mikunj
21e529c6c9 Forward messages from secondary devices to primary device. 2019-10-23 15:31:58 +11:00
Niels Andriesse
bc750964a8 Fix Giphy link previews 2019-10-23 11:55:17 +11:00
Niels Andriesse
4aa1eed979 Debug 2019-10-22 10:09:46 +11:00
Niels Andriesse
17ee4bf7a8 Ditch temporary link preview setup 2019-10-22 09:46:47 +11:00
Niels Andriesse
2d28707687 Switch over to new link preview system 2019-10-22 09:39:42 +11:00
Mikunj
0421794b41 Limit upload retries. 2019-10-22 08:41:57 +11:00
Niels Andriesse
6d0858cf35 Limit allowed characters in display names 2019-10-21 16:28:05 +11:00
Niels Andriesse
f7e01688b0 Disable device linking for now 2019-10-21 15:35:52 +11:00
Niels Andriesse
a978253e00 Fix indentation 2019-10-21 15:26:57 +11:00
Mikunj
e438d09a62 Update attachments for public group chats. 2019-10-21 13:49:38 +11:00
Mikunj
b12e6b838c Disable attachments on non-friends. 2019-10-18 16:12:49 +11:00
Mikunj
8d6094ecd6 Fix crash when viewing media 2019-10-18 15:16:41 +11:00
Mikunj
fd9f1b712f Get attachment logic to work. 2019-10-18 12:47:44 +11:00
Mikunj
c6f5adb447 Update attachments to use url. 2019-10-17 12:03:08 +11:00
Mikunj
c8238df8ff Update checks to isFromUnkownContact. 2019-10-16 14:32:10 +11:00
Niels Andriesse
a5b543c43c Move add public chat button to home screen 2019-10-15 16:19:00 +11:00
Niels Andriesse
c2d4f4b58d Fix mentions bug 2019-10-15 16:07:34 +11:00
Niels Andriesse
cbad885586 Add missing display name update & message fetch 2019-10-15 16:06:38 +11:00
Niels Andriesse
4a613df52d Clean 2019-10-15 14:32:23 +11:00
Niels Andriesse
65f95839d9 Fix build 2019-10-15 13:51:18 +11:00
Niels Andriesse
08a1b0e947 Merge branch 'dev' of github.com:loki-project/loki-messenger-android into custom-server 2019-10-15 13:42:44 +11:00
Niels Andriesse
a8c4fa22a3 Partially fix build 2019-10-15 13:39:17 +11:00
Niels Andriesse
e423ec8848 Change mentions approach 2019-10-11 16:37:28 +11:00
Mikunj
2f18c5bad2 Merge branch 'dev' into custom-server
# Conflicts:
#	src/org/thoughtcrime/securesms/loki/DisplayNameActivity.kt
2019-10-11 15:40:09 +11:00
Mikunj
4657b79179 UI improvements. 2019-10-11 15:38:15 +11:00
Niels Andriesse
ca9032e109 Quick fix crash 2019-10-11 14:59:13 +11:00
Niels Andriesse
0f364fcea7 Render mentions in previews & refactor 2019-10-11 14:41:43 +11:00
Niels Andriesse
48d282a864 Require the user to pick a display name 2019-10-11 13:37:56 +11:00
Niels Andriesse
b425929da6 Render mentions in replies 2019-10-11 13:24:20 +11:00
Niels Andriesse
57bbad6fab Debug 2019-10-11 12:02:02 +11:00
Mikunj
b676c25930 Add UI 2019-10-11 11:53:53 +11:00
Niels Andriesse
18eb3449ca Debug 2019-10-11 11:42:01 +11:00
Niels Andriesse
7ea349ff00 Mention by display name rather than hex encoded public key 2019-10-11 11:13:34 +11:00
Mikunj
13d42f542c Added public chat manager.
Replace hard coded public chat server with dynamic one.
2019-10-11 09:36:52 +11:00
Niels Andriesse
3d78dac65c Ensure that mention behavior is consistent cross-platform 2019-10-10 16:29:58 +11:00
Niels Andriesse
f0224f8ec6 Debug 2019-10-10 15:30:34 +11:00
Niels Andriesse
871f629e64 Debug 2019-10-10 15:00:14 +11:00
Niels Andriesse
25f1405512 Show user selection view dynamically 2019-10-10 14:44:08 +11:00
Niels Andriesse
9207e479a6 Implement user selection view 2019-10-10 13:53:02 +11:00
Mikunj
8b92932b6d Added database functionality. 2019-10-10 11:03:51 +11:00
Niels Andriesse
25bd1073b0 Pre-populate user ID cache as needed 2019-10-10 10:39:56 +11:00
Niels Andriesse
5901967eee Implement mention rendering 2019-10-10 09:42:40 +11:00
Niels Andriesse
ac9c9f534e Somewhat simplify device linking UI 2019-10-08 14:28:30 +11:00
Niels Andriesse
a44c3fcd57 Clean 2019-10-08 14:10:16 +11:00
Niels Andriesse
bf958fffe1 Partially disable settings for slave devices 2019-10-08 12:17:25 +11:00
Niels Andriesse
d0e5ddfe3f WIP 2019-10-08 10:43:09 +11:00
Niels Andriesse
a6441005ea Merge branch 'multi-device' of github.com:loki-project/loki-messenger-android into multi-device 2019-10-08 10:39:05 +11:00
Niels Andriesse
95695ff88e Clean up seed step 2019-10-08 10:38:22 +11:00
Mikunj
98498a66aa Fix receiving multiple of the same authorisations at once causing us to delete prekeybundles for the user. 2019-10-08 10:11:46 +11:00
Niels Andriesse
79ec4553aa Clean 2019-10-07 16:53:26 +11:00
Niels Andriesse
c8a90ced19 Add missing event 2019-10-07 16:22:13 +11:00
Niels Andriesse
742d9bfa46 Partially implement feedback 2019-10-07 16:15:06 +11:00
Niels Andriesse
19ec4db687 Update for core changes 2019-10-07 15:30:20 +11:00
Mikunj
4f46c6317b Renaming. 2019-10-07 13:28:53 +11:00
Mikunj
dbd8133926 Merge branch 'dev' into multi-device-integration
# Conflicts:
#	src/org/thoughtcrime/securesms/loki/SeedActivity.kt
2019-10-07 12:21:04 +11:00
Mikunj
a2e9271050 Hide link device preference if we're a secondary device. 2019-10-07 12:19:08 +11:00
Niels Andriesse
53a32cf418 Add missing event 2019-10-07 11:16:02 +11:00
Niels Andriesse
33798c6a17 Match iOS analytics 2019-10-07 10:52:59 +11:00
Mikunj
da67bfab4c Multi-device sending typing and receipt messages. 2019-10-07 10:32:45 +11:00
Mikunj
0bfa3c33c7 Multi-device sending media message 2019-10-07 10:14:38 +11:00
Niels Andriesse
4f58bc11a1 Update for new username API 2019-10-07 10:06:19 +11:00
Mikunj
8a3b4a6a14 Refactor. 2019-10-07 09:44:43 +11:00
Mikunj
fb3967db55 Multi-device sending text messages. 2019-10-04 16:29:51 +10:00
Mikunj
8e495d087b Fix bugs in multi device pairing. 2019-10-03 16:02:22 +10:00
Mikunj
be9afa243c Fix auto accept friend request logic. 2019-10-03 10:05:50 +10:00
Mikunj
be55e1bb55 Fixed multi device database primary key allocation. 2019-10-02 16:26:03 +10:00
Mikunj
e07d8ddb52 Fix ui not being dismissed on message send failure.
Fix prekey bundle not being sent with the device pairing request.
2019-10-02 15:28:36 +10:00
Mikunj
72059328b3 Show toast if message sending failed.
Added resetting
2019-10-02 13:15:25 +10:00
Mikunj
373b9b38f6 Moved pairing logic into dialog.
Refactor.
2019-10-02 10:24:08 +10:00
Mikunj
80e9b8223a Hooked up dialog ui 2019-10-01 15:35:52 +10:00
Mikunj
258ad57c12 Merge branch 'dev' into multi-device-integration 2019-10-01 14:44:16 +10:00
Niels Andriesse
9f7437aa9e Implement device linking dialog 2019-10-01 12:21:38 +10:00
Niels Andriesse
d8e86a5e42 WIP 2019-09-30 16:41:53 +10:00
Niels Andriesse
e77ee30c9b Implement device linking dialog skeleton 2019-09-30 16:22:12 +10:00
Niels Andriesse
0f6a7e88b6 Match iOS design changes 2019-09-30 15:38:07 +10:00
Niels Andriesse
132b59347a Fix build 2019-09-30 14:21:21 +10:00
Mikunj
dde4ee6e36 Merge branch 'dev' into multi-device-integration 2019-09-30 12:21:04 +10:00
Mikunj Varsani
c546df0227
Merge pull request #30 from loki-project/public-chat-fix
Public chat message signing
2019-09-30 12:19:32 +10:00
Mikunj Varsani
c70de8c569
Merge pull request #23 from loki-project/bug-fix
Correctly show quote author name in group chats.
2019-09-30 12:04:57 +10:00
Mikunj
53ae775af8 Update LokiMessageDatabase. 2019-09-26 13:44:57 +10:00
Mikunj
10c1a9cced Added linking in the ui. 2019-09-26 11:19:36 +10:00
Mikunj
7d1883cfd2 Trigger event when authorisation is accepted. 2019-09-26 10:04:21 +10:00
Mikunj
0b49d7ae0d Fix crashing during start. 2019-09-25 15:08:01 +10:00
Mikunj Varsani
203348b8fb Update device mappings on the file server upon receiving a pairing confirmation. 2019-09-24 16:06:19 +10:00
Mikunj Varsani
8acc0bcff9 Auto accept friend requests if we're friends with the primary device. 2019-09-24 15:02:23 +10:00
Mikunj Varsani
d51c62ecaf Moved LokiMultiDeviceDatabase into LokiAPIDatabase. 2019-09-24 13:33:42 +10:00
Mikunj
90ee676a53 Hookup receiving logic. 2019-09-23 15:38:00 +10:00
Mikunj
901d627d32 Linked storage api and database. 2019-09-23 11:28:17 +10:00
Niels Andriesse
c1c374407f Improve performance 2019-09-19 15:00:52 +10:00
Niels Andriesse
3a257d745b Debug 2019-09-19 14:06:54 +10:00
Mikunj
ff65d4e342 Added Database. 2019-09-19 12:52:37 +10:00
Niels Andriesse
96dadbaaa8 Handle media message friend requests 2019-09-18 17:33:34 +10:00
Niels Andriesse
14508971ed Fix app preview UI 2019-09-18 15:40:18 +10:00
Niels Andriesse
6bf90d7d5d Fix crash 2019-09-18 14:49:08 +10:00
Niels Andriesse
cc7f93688f Fix message ordering 2019-09-18 14:43:02 +10:00
Niels Andriesse
8a16fd2a97 Only record crashes in release mode 2019-09-18 13:56:50 +10:00
Niels Andriesse
cad37f29e7 Fix link previews 2019-09-18 12:13:02 +10:00
Niels Andriesse
9b2a90639d Switch onboarding seed step and display name step 2019-09-18 11:57:46 +10:00