Commit graph

396 commits

Author SHA1 Message Date
Dominic Renner
25da34b8f2 reverted to old version of whatsapp ext 2019-03-06 18:01:23 +01:00
Dominic Renner
daf0faab61 Fixed many database issues 2019-03-06 16:33:42 +01:00
Dominic Renner
6547a2ce1f changed sqlite to postgresql 2019-03-06 10:59:52 +01: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
Sami Olmari
d634addafc Change help 'import contacts' to 'sync'
After user succesfully sets up bridge, bot will tell what to do next. This info had still old command so I updated message to reflect new 'sync' directive.
2019-03-05 18:56:14 +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
Alexader Eisele
261ff0cad1 Fix Dockerfile
The build script was unable to copy the example config and the start script
2019-02-10 12:17:35 +01: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
Jörg Sommer
ae2ccb0d38 CommandHelp: don't print cmdprefix in management room
In the management room the user don't need to prefix the commands with the
command-prefix. Hence, don't show the prefix in the command list.
2018-12-07 23:31:15 +01:00
Jörg Sommer
3c7d77a456 ExtendedConn.HandleJsonMessage: call jsonParseError
In case of something goes wrong for parsing the message as JSON message,
we should tell this the error handler.
2018-12-07 20:08:06 +01:00
Jörg Sommer
da5e399333 CommandEvent.Reply: Send all messages to management room
Because the Bridge Bot doesn't participate in the rooms it can't send any
messages to this room. Hence, we should send all replies to the management
room.
2018-12-07 20:08:06 +01:00
Jörg Sommer
a626d14a3f No sync on startup; new command import contacts
Having an import of all contacts on each startup and after login is very
annoying, if you have a big list of contacts. If you choose to not join a
room with all contacts, you get the invitation over and over on each
restart of the service. Better is to have a command for the management
room to explicitly start the import.
2018-12-07 20:08:06 +01:00
Jörg Sommer
ebfc5e214a Mention help in the first message in management room
To better guide the user after the first contact, tell him to use `help`
to see the list of commands.
2018-12-07 16:18:52 +01: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
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
Hugues Morisset
62049fdf82 Allow to set uid guid when running whatsapp program
Set it using the env variable UID and GUID
2018-10-24 15:46:15 +02: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
Krombel
8427fedf98 parse management room from database as well 2018-10-16 21:58:12 +02:00
Tulir Asokan
fab2bd2e12 Merge pull request #11 from krombel/implementHelp
implement !help
2018-10-16 22:50:11 +03:00
Krombel
ed79002592 extend comments on methods of commands.go 2018-10-16 19:16:13 +02:00
Krombel
c107abbeb5 add reply for unknown command; use configured command prefix 2018-10-16 19:15:38 +02:00
Krombel
798a3dfd2c implement !help 2018-10-16 18:36:22 +02: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
Tulir Asokan
68c0190594 Rename binary content en/decode functions 2018-09-01 23:53:47 +03:00
Tulir Asokan
ed27fa775e Re-break everything and fix Matrix->WhatsApp replies 2018-09-01 23:38:03 +03:00
Tulir Asokan
e4a78832ad Switch back to go-whatsapp upstream 2018-08-31 11:24:27 +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
347854dc8c Update dependencies 2018-08-30 01:10:03 +03:00
Tulir Asokan
5a1a6f9c3c Remove config update stuff 2018-08-29 23:48:15 +03:00