Tulir Asokan
1d8ef6cb89
Add support for MSC2409
2021-12-07 16:02:51 +02:00
Tulir Asokan
00d16bea19
Add notification for live location messages. Fixes #403
2021-12-07 14:51:56 +02:00
Sumner Evans
ed2bb3ac5f
checkpoints: send retry_num
2021-12-03 17:50:55 -07:00
Tulir Asokan
7bb629d199
Fix Matrix read receipt handling too
2021-12-01 21:14:37 +02:00
Tulir Asokan
a909750dcc
Mark all messages as read instead of only last one
2021-11-30 16:38:37 +02:00
Tulir Asokan
04ab823a4d
Fix some things
2021-11-30 15:27:15 +02:00
Tulir Asokan
0a8cc8fd39
Add checkpoints for ignored redactions. Closes #399
2021-11-30 12:11:23 +02:00
Tulir Asokan
a61ef492cf
Fix status broadcast check accidentally muting all chats
2021-11-22 11:03:09 +02:00
Sumner Evans
139a0bd679
Send checkpoints using new API and send DECRYPTED step checkpoints
2021-11-18 08:46:14 -07:00
Sumner Evans
52f09001a7
portal: send checkpoint for matrix messages
2021-11-18 08:46:14 -07:00
Tulir Asokan
91de4fe70e
Make proper thumbnails for images when sending to WhatsApp
2021-11-11 20:33:22 +02:00
Tulir Asokan
a8beec8754
Handle identity changes properly. Fixes #384
2021-11-09 17:49:34 +02:00
Tulir Asokan
445da09e1d
Simplify reaction error notices
2021-11-09 15:26:37 +02:00
abmantis
b652281682
Send portal notice on reactions
...
Closes #373
2021-11-09 15:23:55 +02:00
Tulir Asokan
f5ae637ffd
Resync all puppets after app state sync completes
2021-11-08 13:04:39 +02:00
Tulir Asokan
19104d857b
Remove unused variable and fix formatting
2021-11-06 21:30:27 +02:00
Tulir Asokan
ea045160a2
Never return nil in IntentFor(). Fixes #379
2021-11-06 14:20:56 +02:00
Tulir Asokan
64db9c9c9b
Fix displayname not being html-escaped in relay mode templates
2021-11-05 20:08:49 +02:00
Tulir Asokan
433aaf3829
Reimplement more things
2021-11-05 12:17:56 +02:00
Tulir Asokan
7e20452783
Move all SetReply calls to one place
2021-11-05 11:47:51 +02:00
Tulir Asokan
752aff48f1
Prioritize backfilling recent messages and fix some bugs
2021-11-03 21:34:06 +02:00
Tulir Asokan
c42f2123fb
Use bridge info content struct from mautrix-go
2021-11-03 20:41:34 +02:00
Tulir Asokan
2d90295488
Use partial info from history sync if latest group info not found
2021-11-03 14:43:53 +02:00
Tulir Asokan
ab4f16328e
Send a dummy event for initial history backfill too
2021-11-02 19:09:52 +02:00
Tulir Asokan
e0d79f2de1
Re-add call start notices
2021-11-02 15:46:31 +02:00
Tulir Asokan
7218f9ad76
Adjust logic for adding members in backfill
2021-11-02 12:28:53 +02:00
Tulir Asokan
9994a04f79
Allow redacting through relaybot. Fixes #298
2021-11-01 16:46:03 +02:00
Tulir Asokan
dd50379c3a
Fix participant ID in replies and update comment
2021-11-01 16:29:13 +02:00
Tulir Asokan
4ac445a868
Fix checking if message contains interesting things
2021-11-01 15:30:56 +02:00
Tulir Asokan
ce8a29b46f
Update whatsmeow. Fixes #365
2021-11-01 13:03:09 +02:00
Tulir Asokan
345244fedb
Reimplement open command
2021-11-01 11:28:52 +02:00
Tulir Asokan
baf2482c3a
Store server timestamp of outgoing messages in db
2021-11-01 11:21:38 +02:00
Tulir Asokan
2bcc15cb47
Don't log warnings for unhandled messages with no human-readable content
2021-11-01 11:21:38 +02:00
Sumner Evans
96cf814848
Add option to disable federation on portal rooms ( #362 )
2021-11-01 11:17:44 +02:00
Tulir Asokan
79f51af06e
Improve invite message text
2021-10-31 20:47:30 +02:00
Tulir Asokan
630095e28a
Add support for group invite messages
2021-10-31 20:42:53 +02:00
Tulir Asokan
1e5d5c1a3e
Implement joining groups and checking invite links
2021-10-31 19:59:30 +02:00
Tulir Asokan
dc9e08d39f
Stop using ioutil
2021-10-31 13:30:19 +02:00
Tulir Asokan
4f11d41a60
Fix bug in bridging captions
2021-10-30 19:17:10 +03:00
Tulir Asokan
2b2f1abd85
Improve unhandled message log
2021-10-30 14:47:46 +03:00
Tulir Asokan
3d384a6db7
Clean up and fix some things
2021-10-29 16:50:29 +03:00
Tulir Asokan
bb9a0f6528
Make relay mode more like the Signal bridge
2021-10-28 13:57:15 +03:00
Tulir Asokan
149e9bc8af
Implement WhatsApp->Matrix group info updates
2021-10-28 12:59:22 +03:00
Tulir Asokan
1ad17048cc
Add better logs for Matrix redaction handling
2021-10-27 21:34:22 +03:00
Tulir Asokan
0784132649
Fix choosing intent to handle redaction
2021-10-27 21:09:36 +03:00
Tulir Asokan
92c9ec6203
Remove some commented code and add note about future code to remove
2021-10-27 19:48:14 +03:00
Tulir Asokan
43922cf09e
Pre-render markdown for undecryptable message notice
2021-10-27 18:44:17 +03:00
Tulir Asokan
b918b4f261
Handle decryption errors from WhatsApp properly
2021-10-27 18:31:33 +03:00
Tulir Asokan
b874d324eb
Send dummy event after backfill
...
This is necessary in case there aren't any real messages before the next
backfill. Otherwise the next backfill would go before the old backfill
(at the top of the room) rather than at the bottom of the room.
2021-10-26 21:30:44 +03:00
Tulir Asokan
0b4d0bbbe1
Handle history sync payloads with MSC2716 batch sending
2021-10-26 17:01:10 +03:00
Tulir Asokan
b45e6b29f5
Fix panic and double puppeting
2021-10-25 18:31:37 +03:00
Tulir Asokan
56850bb698
Initial switch to go.mau.fi/whatsmeow
2021-10-22 20:14:34 +03:00
Alexandar Mechev
9ca18ea548
Convert webp images to png when sending to WhatsApp ( #346 )
...
WhatsApp doesn't seem to like webp images
2021-10-06 21:11:37 +03:00
Tulir Asokan
da9fadb009
Add comment
2021-08-19 19:20:11 +03:00
Tulir Asokan
b3312bc663
Always use blank content for replies
...
It seems to work fine on the iOS, Android and Web versions of WhatsApp,
so let's save the two LoadMessages calls.
2021-08-19 19:17:46 +03:00
Tulir Asokan
4fe179d0d7
Remove content from message table. Fixes #320
2021-08-19 19:17:19 +03:00
Tulir Asokan
52484dc992
Add flag to invite events that will be auto-accepted
2021-08-18 16:24:13 +03:00
Tulir Asokan
039059df45
Ignore WhatsApp file length and hash mismatches
2021-08-06 01:33:17 +03:00
Tulir Asokan
f1dd496a2d
Add support for Matrix->WhatsApp location messages
2021-08-04 10:56:55 +03:00
Tulir Asokan
e2acab694c
Fix handling gifs in stickers
2021-07-23 22:44:35 +03:00
Tulir Asokan
e78dda0883
Move UserTyping calls to sendMessage
2021-07-07 15:11:00 +03:00
Tulir Asokan
e926d0175e
Track WhatsApp message age and processing duration
2021-06-25 15:33:46 +03:00
Tulir Asokan
3eb5f44023
Add support for slightly older voice message identifier
2021-06-23 13:23:00 +03:00
Tulir Asokan
b66f37e373
Add ptt flag when sending MSC3245 voice messages to WhatsApp
2021-06-22 20:33:30 +03:00
Tulir Asokan
252d645fea
Fix bridging audio/video duration from/to WhatsApp
2021-06-22 20:05:02 +03:00
Tulir Asokan
bd207df82d
Store last message MXID in database for multipart messages
2021-06-22 12:35:38 +03:00
Tulir Asokan
4b80c15a0a
Add some logs and increase timestamp difference for short-circuiting deduplication
2021-06-21 13:53:08 +03:00
Tulir Asokan
30ddd788ae
Don't stop message processing loop if room creation fails
2021-06-19 02:22:21 +03:00
Tulir Asokan
bc7a82c0be
Use mutex for accessing go-whatsapp contacts and chats maps
2021-06-19 02:22:01 +03:00
Tulir Asokan
b5c3e8abcb
Make sure puppet has displayname set when sending message
2021-06-15 12:34:55 +03:00
Tulir Asokan
d4b7595b6e
Add better error messages for some send errors
2021-06-15 12:07:31 +03:00
Tulir Asokan
1a23bfda30
Log type of message when starting handling
2021-06-10 16:29:20 +03:00
Tulir Asokan
06b84c4bb9
Add option to disable status bridging. Fixes #166
2021-06-01 15:28:15 +03:00
Tulir Asokan
80b534323f
Try to fix false positive send error on whatsapp mobile
2021-06-01 13:32:14 +03:00
Tulir Asokan
7c16eb8c53
Get last message timestamp from database when checking if message is too old
2021-05-12 13:39:24 +03:00
Tulir Asokan
2742d90299
Add option to only bridge mute status and tags when creating portal
2021-04-29 11:57:05 +03:00
Tulir Asokan
badea9c547
Add option to bridge archive and mute status from WhatsApp
2021-04-19 22:14:32 +03:00
Tulir Asokan
c811da6f7d
Cleanup empty group portals even if user didn't leave WhatsApp side
2021-04-16 16:36:56 +03:00
Tulir Asokan
d3c0b50d5a
Move request retrying to mautrix-go
2021-04-15 16:23:40 +03:00
Tulir Asokan
e9e623abf6
Increment chunk num so backfill logs work correctly
2021-04-01 12:31:39 +03:00
Tulir Asokan
24d172fd55
Don't create portals for stub messages
2021-03-19 21:14:01 +02:00
Tulir Asokan
93953ec48f
Sync contact info when syncing room members if puppet has no displayname
2021-03-19 20:55:08 +02:00
Tulir Asokan
e19f8c7532
Fix some relaybot room create issues
...
Fixes #270
Fixes #236
2021-03-08 01:51:37 +02:00
Tulir Asokan
8a6877746d
Wait for connection before handling message when login is in progress
2021-03-05 16:54:23 +02:00
Tulir Asokan
001746be07
Ignore echo of invites sent by the bridge
2021-03-05 11:29:08 +02:00
Tulir Asokan
ab0019d087
Make sure interface conversion succeeds in error check
2021-03-04 20:46:08 +02:00
Héctor Ramírez Franco
464a7ee765
Add config option to disable bridging m.notices
...
Closes #259
2021-02-26 16:11:34 +02:00
Tulir Asokan
3d778a5a44
Create user_portal row when creating portal for new chat
...
Closes #273
Co-authored-by: dbedoya <dbedoya@ikono.com.co>
2021-02-26 16:09:24 +02:00
Tulir Asokan
0e3bf04daf
Improve post-reconnection resending and fix potential encryption races
2021-02-25 17:22:29 +02:00
Tulir Asokan
6227dfb669
Fix re-syncing broadcast list recipients
2021-02-21 15:00:04 +02:00
Tulir Asokan
ac2ca08007
Sync broadcast list recipients too
2021-02-21 14:45:38 +02:00
Tulir Asokan
a911a0c1a9
Add better support for broadcast lists
2021-02-21 14:18:15 +02:00
Tulir Asokan
7bd47fabb2
Update go-whatsapp to break everything and maybe improve things
2021-02-18 23:36:14 +02:00
Tulir Asokan
ca118e8678
Handle 404 errors when backfilling messages
2021-02-17 01:22:06 +02:00
Tulir Asokan
69dd7f803a
Move whatsapp-ext to go-whatsapp
2021-02-17 01:21:30 +02:00
Tulir Asokan
9f4283b4e0
Add option to disable bridging Matrix leave events
2021-02-10 22:15:23 +02:00
Tulir Asokan
87ead90e03
Ignore group leaves in message history
2021-02-10 20:27:14 +02:00
Tulir Asokan
394da69a69
Ignore picture commands if chat meta sync is disabled
...
We get the same data from the message log
2021-02-09 23:52:55 +02:00
Tulir Asokan
2188dc7701
Add option to not re-sync chat info and user avatars to avoid rate limits
2021-02-09 23:41:13 +02:00
Tulir Asokan
500cb0cd7c
Improve logging when fetching backfill messages
2021-01-23 18:09:58 +02:00
Tulir Asokan
e6ccdb83b7
Revert portal backfill lock changes and update mautrix-go
2020-11-18 13:29:47 +02:00
Tulir Asokan
83779c6970
Correctly log cases where getMessageIntent returns nil
2020-11-17 02:16:32 +02:00
Tulir Asokan
7d54aca762
Add metric for tracking buffer size
2020-11-16 14:28:08 +02:00
Tulir Asokan
05b8d577f3
Retry sending messages if server returns 502
2020-11-09 18:05:23 +02:00
Tulir Asokan
a49a5fa3d4
Retry sending when receiving 599 error
2020-11-04 14:58:24 +02:00
Tulir Asokan
a1740db0d7
Fix bridge->bridge file names
...
WhatsApp uses the "title" and "fileName" fields for document names. The bridge
was only reading title and sending fileName, so sending a document from one
bridge to another through WhatsApp would lose the file name.
Also use names like "image.png" instead of "<random id>.png" for unnamed files
2020-11-02 17:18:21 +02:00
Tulir Asokan
63933d0c7e
Include debug message when receiving 599 status code
2020-10-26 17:10:46 +02:00
Tulir Asokan
cccaa62a20
Merge pull request #232 from rreuvekamp/fix_228
...
Set RestrictMessageSending in portal create+update
2020-10-24 16:53:46 +03:00
Remi Reuvekamp
702a837929
Set RestrictMessageSending in portal create+update
...
Fixes #228
2020-10-12 12:59:14 +02:00
Tulir Asokan
cd8352a7df
Remove webp conversion
2020-10-09 18:24:29 +03:00
Tulir Asokan
491d8b232e
Stop using github.com/pkg/errors
2020-10-05 22:38:34 +03:00
Tulir Asokan
d67c3a8c96
Wait up to 3 seconds for encryption keys to arrive
2020-09-24 15:25:36 +03:00
Tulir Asokan
2638204eaa
Add option to update m.direct with double puppeting
2020-08-22 13:07:55 +03:00
Tulir Asokan
9671b6c39a
Use MentionedJIDs metadata instead of assuming everything is a mention
2020-07-31 14:30:58 +03:00
Tulir Asokan
0430446d6d
Make message buffers bigger and make locking message handling less hacky
2020-07-23 20:10:21 +03:00
Tulir Asokan
3e7853f125
Send errors for more types of media bridge errors
2020-07-21 16:08:54 +03:00
Tulir Asokan
4a673b92fa
Kick left users when syncing members
2020-07-05 23:16:59 +03:00
Tulir Asokan
8f805c539a
Fix backfill in private chat portal with self
2020-07-05 19:24:48 +03:00
Tulir Asokan
ffb8529b73
Allow creating private chat portal by inviting WhatsApp puppet. Fixes #110
2020-07-05 18:57:03 +03:00
Tulir Asokan
43a3815970
Fix some things related to m.bridge
2020-07-03 13:47:02 +03:00
Tulir Asokan
44b399790b
Fix replies in encrypted rooms
2020-06-30 16:26:13 +03:00
Tulir Asokan
8cfb04a5ed
Handle WhatsApp invites. Fixes #120
2020-06-26 00:13:03 +03:00
Tulir Asokan
326293303d
Handle WhatsApp kicks and Matrix invites
2020-06-25 23:58:35 +03:00
Tulir Asokan
fed6756ae5
Handle leaving and kicking from Matrix. Fixes #47
2020-06-25 23:33:11 +03:00
Tulir Asokan
cbd1a79e80
Ignore some types of message parse errors
2020-06-23 19:03:20 +03:00
Tulir Asokan
3fe9289f91
Add support for Matrix->WhatsApp GIF bridging. Fixes #141
2020-06-23 16:37:13 +03:00
Tulir Asokan
689202f43d
Move HandleMediaMessage parameters to a struct
2020-06-20 22:24:27 +03:00
Lieuwe Rooijakkers
9cc8b04c8e
use whatsapp document filename for document type files
...
Fixes #199
2020-06-20 17:29:52 +02:00
Tulir Asokan
8e30262275
Fix sending updated bridge info
2020-06-15 20:39:16 +03:00
Tulir Asokan
59e2015fa7
Add option to resend bridge info to all portals
2020-06-15 20:28:04 +03:00
Tulir Asokan
ec86259a20
Update bridge info when portal metadata changes
2020-06-15 14:56:52 +03:00
Tulir Asokan
b8de8544e1
Add state key to m.bridge events
2020-06-11 14:41:45 +03:00
Tulir Asokan
7c799f1faa
Encrypt media from WhatsApp when sending to encrypted portal
2020-06-10 15:26:14 +03:00
Tulir Asokan
210b1caf65
Add bridging of location messages to Matrix
2020-06-10 14:58:57 +03:00
Tulir Asokan
e4a160e650
Add basic bridging of contact messages to Matrix
2020-06-10 14:06:36 +03:00
Tulir Asokan
934f98119f
Add option to disable notifications during initial backfill
2020-06-08 20:51:24 +03:00
Tulir Asokan
535efcc8bd
Send "delivery" receipt for messages bridged from WhatsApp too
2020-06-05 17:54:09 +03:00
Tulir Asokan
f1b50a22f3
Add bridge info state events for new portal rooms
2020-06-01 15:09:58 +03:00
Tulir Asokan
c72610f3f0
Fix handling new messages during initial portal backfill
2020-05-28 20:35:43 +03:00
Tulir Asokan
46e53eca4d
Fix bridging messages to WhatsApp with relaybot. Fixes #191
2020-05-25 23:11:00 +03:00
Tulir Asokan
c6b4f34c28
Add option to send read receipt on confirmed delivery to WhatsApp
2020-05-25 11:17:47 +03:00
Tulir Asokan
aa0a4d3eea
Call LoadMediaInfo and retry if media download fails with 404/410
2020-05-24 17:46:19 +03:00
Tulir Asokan
5a62982a56
Add option to query message from phone when send times out
2020-05-24 17:28:30 +03:00
Tulir Asokan
c909a85fc7
Re-add sending bridging failure messages
2020-05-24 15:44:20 +03:00
Tulir Asokan
91bb38eaa3
Wait for response even after message send timeout
2020-05-24 15:33:26 +03:00
Tulir Asokan
4f09835b81
Fix sending captions to Matrix
2020-05-22 17:13:23 +03:00
Tulir Asokan
e4bc254a65
Change incoming call notices back to m.text
2020-05-21 20:14:43 +03:00
Tulir Asokan
e08676079a
Fix bridging encrypted media from Matrix
2020-05-20 16:45:21 +03:00
Tulir Asokan
a770263d86
Encrypt media bridging error notices
2020-05-12 23:38:01 +03:00
Tulir Asokan
1c3de877db
Maybe support e2be by default and fix some bugs
2020-05-12 22:25:55 +03:00
Tulir Asokan
6e50a7c380
Switch appservice module location
2020-05-09 20:08:05 +03:00
Tulir Asokan
f89fcf7212
Make no-cgo build work without source changes
2020-05-09 02:08:23 +03:00
Tulir Asokan
baae66ed04
Add basic end-to-bridge encryption support
...
Still missing persisting sync tokens and crypto state in DB
2020-05-09 02:04:01 +03:00
Tulir Asokan
acc25a02e4
Update mautrix-go
2020-05-08 22:32:22 +03:00
Peter Roberts
973afcdd26
portal: bridge notices
2020-04-12 10:38:44 +03:00
rafaeltheraven
6d806227c7
Actually removed instead of commenting out :P
2020-01-09 10:46:45 +01:00
rafaeltheraven
c8e5c06a57
Removed strange workaround, fixing #134
2020-01-09 10:41:45 +01:00
Tulir Asokan
302fae6649
Bypass mautrix.Content's MarshalJSON. Fixes #132
2020-01-07 22:27:37 +02:00
Tulir Asokan
8c3807a16d
Add puppet to personal filtering community when adding portal
2020-01-07 21:40:51 +02:00
Tulir Asokan
e4ddc43007
Merge pull request #118 from 14mRh4X0r/support-go-1-11
...
Replace ReplaceAll(…) with Replace(…, -1)
2019-12-31 21:26:31 +02:00
Tulir Asokan
e056459ab4
Add/fix sticker bridging in both directions
...
* Matrix stickers are sent as images
* WhatsApp stickers were missing the incoming event handler
Fixes #124
Fixes #127
Closes #126
Closes #129
Co-authored-by: rafaeltheraven <rafael.dulfer@gmail.com>
2019-12-31 20:22:04 +02:00
Willem Mulder
041c257e7a
Replace ReplaceAll(…) with Replace(…, -1)
...
This allows people to build the bridge with Go 1.11, the current version
in Debian stable.
2019-12-02 22:52:40 +01:00
Tulir Asokan
bb1d28c755
Fix typo
2019-11-13 09:40:41 +02:00
Tulir Asokan
14f039f5a4
Don't drop messages even if database says authenticated user is not in chat
2019-11-13 09:36:43 +02:00
Tulir Asokan
3caca1b9a0
Fix NeedsRelaybot check for groups too
2019-11-11 22:41:58 +02:00
Tulir Asokan
03d42640fe
Add basic relaybot support. Fixes #20
2019-11-10 21:22:11 +02:00
Nicolas Werner
fc4098d3e4
Receive stickers from whatsapp
...
We need to convert them to png, otherwise synapse has trouble
thumbnailing them. Also the default webp decoder can't decode WhatsApp
stickers, so we use the chai2010 decoder.
2019-10-05 02:39:55 +02:00
Tulir Asokan
fb826601d8
Fix bridging media when whatsapp sends wrong mime type
2019-08-31 00:32:51 +03:00
Tulir Asokan
d91f705e95
Fix most unexpected logout bugs, handle connection-in-progress states better and send warning message if sending to whatsapp times out
2019-08-30 22:04:57 +03:00
Tulir Asokan
c4d2b04e67
Fix misleading connection error message in private chat portals
2019-08-30 21:37:12 +03:00
Tulir Asokan
5af374e6b0
Fix bridging error messages in private chats
2019-08-30 21:32:29 +03:00
Tulir Asokan
85d57d52bb
Log better error when parsing message fails
2019-08-25 19:41:53 +03:00
Tulir Asokan
f28322d1f7
Send error message if downloading media from WhatsApp fails
2019-08-24 23:08:45 +03:00
Tulir Asokan
07d43c4825
Send call notifications as notices. Fixes #82
2019-08-24 22:40:09 +03:00
Tulir Asokan
eb3595bd39
Add newly created portals to personal filtering community
2019-08-10 15:44:05 +03:00
progserega
92958343dd
Add option to allow inviting other users in portal rooms ( #77 )
...
This doesn't mean the invited users get bridged, but for some use cases that doesn't matter
2019-07-16 12:16:17 +03:00
Tulir Asokan
2023f55f32
Recover from panics in event handlers
2019-06-18 08:24:17 +03:00
Tulir Asokan
5be78dd978
Fix the crash in #69
2019-06-13 21:30:38 +03:00
Tulir Asokan
e124641107
Add option to set private chat portal rooms' name/avatar explicitly
2019-06-01 20:03:29 +03:00
Tulir Asokan
9fa0ad923d
Fix potential nil pointer crash
2019-06-01 19:20:06 +03:00
Tulir Asokan
1285aa4327
Fix fetching more than one chunk of initial history
2019-05-31 22:30:57 +03:00
Tulir Asokan
a40584db41
Add command to delete all own portals for a fresh start
2019-05-31 19:33:18 +03:00
Tulir Asokan
37cd34e4bf
Make contact wait delay configurable and fix nil pointer usage
2019-05-30 20:25:04 +03:00
Tulir Asokan
02f78155b5
Only invite default puppet for backfilling when needed
2019-05-30 17:48:22 +03:00
Tulir Asokan
521a8b74aa
Share backfill start/end code between initial and recovery fills
2019-05-30 17:25:56 +03:00
Tulir Asokan
c4751f4953
Use default puppet when backfilling to avoid rate limits
2019-05-30 17:22:03 +03:00
Tulir Asokan
a9fd97932b
Send alerts about incoming calls
2019-05-30 17:00:36 +03:00
Tulir Asokan
1c009b96fe
Only load 50 messages per request in initial fill
2019-05-28 21:48:37 +03:00
Tulir Asokan
dce08b1422
Add user-portal mapping to database
2019-05-28 21:31:25 +03:00
Tulir Asokan
666194b066
Possibly fix and/or break missed message backfilling
2019-05-28 21:30:39 +03:00
Tulir Asokan
1d43aeca2f
Remove message locking as message handling is synchronous per-portal
2019-05-28 14:12:35 +03:00
Tulir Asokan
2c9c473040
Add basic Matrix puppeting support
...
May contain bugs.
EDUs from /sync are not yet handled.
2019-05-24 02:33:30 +03:00
Tulir Asokan
5eb06ee43c
Update go-whatsapp with new proto version
2019-05-23 22:57:19 +03:00
Tulir Asokan
f9c3e99d10
Fix/change things
2019-05-23 20:09:22 +03:00
Tulir Asokan
d7b36d55d7
Handle puppet avatar fetch errors properly
2019-05-23 19:07:34 +03:00
Tulir Asokan
7b067b4737
Set avatar in room create request and sync participants before filling history
2019-05-22 23:27:58 +03:00
Tulir Asokan
14f96bd96f
Fix some bugs in missed message and initial history filling
2019-05-22 23:05:58 +03:00
Tulir Asokan
4db9777b9a
Fetch initial history in chunks to allow fetching more history
2019-05-22 22:05:28 +03:00
Tulir Asokan
015e42279d
Fix handleMessage call in handleHistory
2019-05-22 17:39:33 +03:00
Tulir Asokan
b363547bdf
Possibly significantly improve how portals are created and synced
2019-05-22 16:46:18 +03:00
Tulir Asokan
6f2a51410f
Make message handling more synchronous and fill history on portal create
2019-05-21 23:44:14 +03:00
Tulir Asokan
adc7257490
Add admin command to delete portal and fix some other things
2019-05-21 21:06:27 +03:00
Tulir Asokan
b0d774a5a5
Add database migrations and handle leaving private chat portals. Fixes #7
2019-05-16 21:26:43 +03:00
Tulir Asokan
c1e1964fc5
Add WhatsApp<->Matrix redaction bridging
2019-05-16 02:25:13 +03:00
Tulir Asokan
e5085b87c7
Log message ID when failing to download media
2019-05-16 00:35:04 +03:00
Tulir Asokan
6b73c66e12
Improve connection error handling
2019-05-15 23:04:09 +03:00
Tulir Asokan
c88e299348
Set name for status broadcast room when creating and reformat example config
...
Fixes #27
2019-03-14 00:54:05 +02:00
Tulir Asokan
c054fbae8e
Remove reply fallback before generating new reply fallback. Fixes #26
2019-02-20 14:46:37 +02:00
Tulir Asokan
9e170f3d04
Add a bunch of new logging
2019-01-21 23:55:16 +02:00
Tulir Asokan
79bd35964f
Update license year, Dockerfile, docker-run.sh and deps and add editorconfig
2019-01-12 15:54:04 +02:00
Tulir Asokan
1cccefd34c
Switch to Go modules
2019-01-11 21:17:39 +02:00
Jörg Sommer
0d49bd8d08
Portal.CreateMatrixRoom: ensure the user exists
...
In the log some message show up with `/_matrix/client/r0/createRoom
code=403 wrapped=M_FORBIDDEN: Application service has not registered this
user`. This is caused by the handling of text messages coming from unknown
users:
mautrix-whatsapp/vendor/github.com/Rhymen/go-whatsapp/handler.go:106
mautrix-whatsapp/user.go:250
mautrix-whatsapp/portal.go:551
Hence, before creating a Matrix room, we must ensure the user for this
room exists.
2018-12-07 16:18:52 +01:00
Jörg Sommer
95c8c01450
Check errors of GetProfilePicThumb
...
When a request for GetProfilePicThumb fails, WhatsApp sends an JSON object
containing a status field: `{"status":404}`. In my tests, it did send the
codes 401 and 404 which might correspond to the HTTP status codes. At
least, we don't have data to update the avatar and should stop doing so.
2018-12-07 16:18:52 +01:00
Jörg Sommer
abe73684d0
Check errors for GetGroupMetaData
...
When a request for GroupMetadata fails, WhatsApp sends an JSON object
containing a status field: `{"status":500}`. In my tests, it sends the
codes 401, 404 and 500 which might have the meaning of the HTTP status
codes. At least, we don't have data to update the portal and should stop
doing anything.
2018-12-07 16:18:44 +01:00
Tulir Asokan
c4ada14c2f
Increase length recently handled events array to 100
2018-09-02 00:01:22 +03:00
Tulir Asokan
ed27fa775e
Re-break everything and fix Matrix->WhatsApp replies
2018-09-01 23:38:03 +03:00
Tulir Asokan
79851a62b4
Add locking for whatsapp->matrix messages for desegregated group chats
2018-08-31 00:13:08 +03:00
Tulir Asokan
22cdf519f2
Fix desegregation changes to make the bridge work again
2018-08-30 01:10:26 +03:00
Tulir Asokan
c7348f29b0
Initial desegregation of users and automatic config updating
2018-08-29 00:40:54 +03:00
Tulir Asokan
6ad224a58b
Convert mentions to names in plaintext body. Fixes #3
2018-08-28 20:09:37 +03:00
Tulir Asokan
dad2fc29ab
Send captions in a different message and improve other things
2018-08-27 23:15:05 +03:00
Tulir Asokan
b978930c88
Improve handling of weird potentially non-corner case in GetMessageIntent()
2018-08-27 01:06:27 +03:00
Tulir Asokan
6db0dc23ab
Handle potential weird corner case in GetMessageIntent()
2018-08-27 00:37:54 +03:00
Tulir Asokan
65f077c645
Fix/improve minor things
2018-08-26 22:50:28 +03:00
Tulir Asokan
9da7f15e8f
Add Matrix->WhatsApp room name changes
2018-08-26 17:02:32 +03:00
Tulir Asokan
0d45b5b857
Add power level to Matrix user if they're admin
2018-08-26 16:19:50 +03:00
Tulir Asokan
f78fb72622
Implement WhatsApp->Matrix power level bridging
2018-08-26 16:11:48 +03:00
Tulir Asokan
d3a178ecf3
Add handling for group metadata changes and refactor things
...
Group metadata temporarily broken until power level bridging is implemented
2018-08-26 01:56:22 +03:00
Tulir Asokan
060516f9cf
Add Matrix->WhatsApp replies and other stuff
2018-08-26 01:56:22 +03:00
Tulir Asokan
6d08a5ff6c
Use inline code tags for single-line whatsapp monospace blocks
2018-08-26 01:56:22 +03:00
Tulir Asokan
7f91d91f1b
Fix read receipts in private chats and remove unnecessary stuff
2018-08-26 01:56:22 +03:00
Tulir Asokan
8483af9c0a
Stop setting room name for private chats
2018-08-25 00:45:50 +03:00
Tulir Asokan
5f6955d36f
Add Matrix->WhatsApp media bridging
2018-08-24 22:31:18 +03:00
Tulir Asokan
0b7d23e897
Add WhatsApp->Matrix formatting
2018-08-24 22:05:38 +03:00
Tulir Asokan
1f87deb317
Add WhatsApp->Matrix read receipts and phone connection notifications
2018-08-24 20:02:18 +03:00
Tulir Asokan
b62a85a6df
Implement matrix->whatsapp formatting and fix whatsapp->matrix files
2018-08-24 00:52:06 +03:00
Tulir Asokan
329bc9d8ce
Add avatars, room topics and message deduplication
2018-08-23 01:12:26 +03:00
Tulir Asokan
c1f8d264f4
Fix portal DB scanning and add initial message bridging
2018-08-19 18:21:38 +03:00
Tulir Asokan
a9124b89bd
Fix and add things
...
* Fix user ID reservation in registration
* Fix some database things
* Add commands
* Add basic contact syncing and portal creation
* Add better error logging
2018-08-18 22:57:33 +03:00
Tulir Asokan
edd4f817e4
Use type aliases for different ID types and add puppet type
2018-08-17 00:11:28 +03:00
Tulir Asokan
141eba644b
Fix data storage and other things
2018-08-16 19:20:07 +03:00
Tulir Asokan
9c48eeb534
Add puppet and portal stuff and fix config stuff
2018-08-16 15:59:18 +03:00