Commit Graph
100 Commits
Author SHA1 Message Date
Tulir Asokan 29f5ae45c4 Print clean websocket disconnections if they weren't announced by the server beforehand
Also print message send errors when Session is not nil even if Connection is nil
2019-07-04 15:08:59 +03:00
Tulir Asokan 2023f55f32 Recover from panics in event handlers 2019-06-18 08:24:17 +03:00
Tulir Asokan 45e60c2510 Update go-whatsapp 2019-06-16 23:00:45 +03:00
Tulir Asokan 5be78dd978 Fix the crash in #69 2019-06-13 21:30:38 +03:00
Tulir Asokan 2bc0e52250 Fix puppet db inserts. Fixes #69 2019-06-13 21:28:14 +03:00
Tulir Asokan d270c86709 Update go-whatsapp 2019-06-12 12:38:07 +03:00
Tulir Asokan c4186c9029 Update deps and add real version for go-whatsapp dep
Closes #66
2019-06-01 20:18:24 +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 4a13ae731a Fix custom puppet start loop 2019-05-31 23:07:33 +03:00
Tulir Asokan 3345615fc0 Fix indentation in filter json 2019-05-31 23:03:09 +03:00
Tulir Asokan 2bf3edda16 Add logout-matrix command 2019-05-31 23:02:00 +03:00
Tulir Asokan 1285aa4327 Fix fetching more than one chunk of initial history 2019-05-31 22:30:57 +03:00
Tulir Asokan 37fd5dba2c Fix syncing chats for users with old chats 2019-05-31 21:59:23 +03:00
Tulir Asokan 83f4cf2811 Fix crash and add more logging 2019-05-31 20:51:16 +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 063ec7873d Don't allow unsupported database versions without flag 2019-05-28 21:29:43 +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 7f0c67168c Fix potential autoreconnect problem and add exponential backoff 2019-05-28 14:09:49 +03:00
Tulir Asokan 498c0e4130 Ignore invalid data received errors 2019-05-27 14:15:45 +03:00
Tulir Asokan 3f13e13d36 Make not connected errors in sync handling non-fatal 2019-05-27 14:01:30 +03:00
Tulir Asokan 402f482db3 Update deps 2019-05-27 13:48:11 +03:00
Tulir Asokan bfe5af7edc Add Matrix->WhatsApp EDU bridging 2019-05-27 13:46:04 +03:00
Tulir Asokan 5346e01d2a Add logging for custom puppets and save next batch properly 2019-05-24 14:09:48 +03:00
Tulir Asokan 0db44d4cc7 Remove dev replaces in go.mod again 2019-05-24 02:36:59 +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 95e62fae77 Upgrade message content in db to new protocol schema 2019-05-24 01:09:42 +03:00
Tulir Asokan 8d0d5ff504 Switch sync command to use syncPortals and syncPuppets methods used at startup 2019-05-23 22:57:59 +03:00
Tulir Asokan 5eb06ee43c Update go-whatsapp with new proto version 2019-05-23 22:57:19 +03:00
Tulir Asokan 0408db5c07 Add config option for max age of chats to sync 2019-05-23 20:25:46 +03:00
Tulir Asokan 239de25bf0 Don't connect in reconnect command if the user is not logged in 2019-05-23 20:11:55 +03:00
Tulir Asokan f9c3e99d10 Fix/change things 2019-05-23 20:09:22 +03:00
Tulir Asokan 94ba2244b0 Disconnect clients when stopping bridge 2019-05-23 19:16:29 +03:00
Tulir Asokan d7b36d55d7 Handle puppet avatar fetch errors properly 2019-05-23 19:07:34 +03:00
Tulir Asokan 2f78d803c2 Update deps 2019-05-23 18:24:58 +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 9c8a75583e Update deps 2019-05-20 18:46:18 +03:00
Tulir Asokan bd1d60639c Switch to go-whatsapp fork to test json parse error fix 2019-05-20 18:45:16 +03:00
Tulir Asokan 23747d4917 Add automatic connection retries 2019-05-17 23:53:57 +03:00
Tulir Asokan 38540d8efb Make max database connection count configurable and default to 20 2019-05-17 23:33:27 +03:00
Tulir Asokan 6cda7ab549 Add ON DELETE CASCADE for future sqlite databases too 2019-05-17 13:10:46 +03:00
Tulir Asokan 33148909d6 Remove dev replaces in go.mod again 2019-05-17 02:33:49 +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 97e740d93d Maybe improve connecting errors 2019-05-16 18:24:59 +03:00
Tulir Asokan 2381eb029b Report WhatsApp server connection errors to user too. Fixes #18 2019-05-16 18:18:11 +03:00
Tulir Asokan b5af35684d Make connection timeout configurable 2019-05-16 18:08:30 +03:00
Tulir Asokan 5d0edda04a Add command to delete session information to force logout when the bridge gets stuck 2019-05-16 18:00:46 +03:00
Tulir Asokan c1e1964fc5 Add WhatsApp<->Matrix redaction bridging 2019-05-16 02:25:13 +03:00
Tulir Asokan ae92d71d5a Handle connection failures like disconnections 2019-05-16 01:56:33 +03:00
Tulir Asokan f39fd0ac46 Update mautrix-go 2019-05-16 00:51:45 +03:00
Tulir Asokan e5085b87c7 Log message ID when failing to download media 2019-05-16 00:35:04 +03:00
Tulir Asokan e25bf29609 Handle startup connection errors 2019-05-16 00:18:43 +03:00
Tulir Asokan 7fb5cfe884 Remove dev replaces that were accidentally committed 2019-05-15 23:17:31 +03:00
Tulir Asokan adbdf55926 Improve edge case handling in login command by not assuming connection status 2019-05-15 23:17:09 +03:00
Tulir Asokan 6b73c66e12 Improve connection error handling 2019-05-15 23:04:09 +03:00
Tulir Asokan 69879df346 Update deps 2019-05-15 21:49:16 +03:00
Tulir Asokan 043820755f Revert go-whatsapp update again
This partly reverts commit b092e71a44e111f83b3e7716c2855adc7ebc5177
2019-03-30 19:25:26 +02:00
Tulir Asokan 3ed2522a10 Merge pull request #50 from rreuvekamp/fix/panic-when-using-auth-command
Disallow using session commands when not logged in
2019-03-15 22:15:42 +02:00
Tulir Asokan b10fac2bb1 Update go-whatsapp. Fixes #35 2019-03-14 01:15:39 +02: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 67a041c06d Merge pull request #43 from RennerDev/master
Implemented postgres
2019-03-14 00:37:00 +02:00
Tulir Asokan 8c2cb26fd7 Merge pull request #42 from olmari/master
Change help message to 'sync' instead 'import contacts'
2019-03-05 20:14:39 +02:00
Tulir Asokan e051067f81 Upgrade dependencies to version without Rhymen/go-whatsapp@c9a81e9 2019-02-24 02:22:57 +02:00
Tulir Asokan 6f300ae6cb Revert "Use fork of go-whatsapp with better connection handling"
This reverts commit c5aac5e770d40fe5d5549a2939b92f0c103d8165.
2019-02-23 23:29:26 +02:00
Tulir Asokan 542aafe7df Revert "Update dependencies"
This reverts commit cc8928b30e6944aa5cee77b8351beb0f89cd8d1a.
2019-02-23 23:27:38 +02:00
Tulir Asokan 8dfc37b190 Use fork of go-whatsapp with better connection handling 2019-02-20 15:15:30 +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 361a1a1d1c Remove import command and add sync, list, open and pm
Fixes #29
2019-02-20 14:39:46 +02:00
Tulir Asokan 58a1ec9f2e Update dependencies 2019-02-20 13:12:23 +02:00
Tulir Asokan 7853a7ce31 Merge pull request #32 from derEisele/master
Fix Dockerfile
2019-02-11 08:46:10 +02:00
Tulir Asokan 010059969a Remove replace directives in go.mod 2019-01-27 14:17:51 +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
Tulir Asokan bb3d67dba9 Lock state store when saving/loading and update deps 2018-12-16 21:32:10 +02:00
Tulir Asokan c6d33d8bba Make sure there are enough args before getting args 2018-12-08 01:30:15 +02:00
Tulir Asokan 88483fc61f Merge pull request #22 from jo-so/master
Collection of small fixes and improvements
2018-12-08 01:25:24 +02:00
Tulir Asokan abab28f8a7 Merge pull request #14 from izissise/docker-uid
Allow to set uid guid when running whatsapp program
2018-10-26 15:36:10 +03:00
Tulir Asokan a19239b936 Don't rewrite name templates when saving config
Advanced template stuff isn't preserved if you execute them
2018-10-23 18:22:58 +03:00
Tulir Asokan 4e03361df6 Merge pull request #12 from krombel/fixUserManagementRoom
parse management room from database as well
2018-10-16 22:59:27 +03:00
Tulir Asokan fab2bd2e12 Merge pull request #11 from krombel/implementHelp
implement !help
2018-10-16 22:50:11 +03:00
Tulir Asokan fa3105d058 Update dependencies. Closes #9 2018-09-22 18:27:16 +03:00
Tulir Asokan f658c61951 Update ROADMAP.md 2018-09-11 19:39:52 +03:00
Tulir Asokan a893377cc5 Fix Puppet.Scan() 2018-09-02 00:44:10 +03:00
Tulir Asokan c4ada14c2f Increase length recently handled events array to 100 2018-09-02 00:01:22 +03:00
Tulir Asokan c888cb14a0 [BREAKING] Merge pull request #5 from tulir/desegregate
Desegregate users
2018-09-01 23:56:47 +03:00