Tulir Asokan
1ecb9e8b64
login*: set device config on login clients
2025-12-03 17:11:20 +02:00
Tulir Asokan
2004085312
connector: fix import ordering
2025-12-03 17:11:20 +02:00
Conan
3aa7bdfa91
handlematrix: fix delete chat ( #125 )
2025-10-28 02:34:24 +08:00
Conan
b1f3c4c1db
handlematrix: Implement DeleteChatHandlingNetworkAPI ( #122 )
2025-10-07 21:26:10 +08:00
Tulir Asokan
d359bafb53
connector: rename files to be more consistent with other bridges
2025-09-16 22:47:48 +03:00
Tulir Asokan
4f12f5103a
matrix: add support for changing disappearing message timer
2025-08-26 18:17:50 +03:00
Tulir Asokan
a31787f894
client: include event handling error in returns
2025-07-31 14:02:15 +03:00
Adam Van Ymeren
e9abeda916
Rework telegram client lifecycle to hopefully fix not stopping issues ( #112 )
2025-07-17 09:56:11 -04:00
Tulir Asokan
3fb554b934
client: add todo for usernames in links
...
[skip ci]
2025-07-15 16:39:50 +03:00
Adam Van Ymeren
7a04f298d2
move gotd fork into repo. ( #111 )
...
- update to latest telegram layer
- remove some references to fields in tg.Entities that don't exist in
the schema
- originally added here:
https://github.com/beeper/td/commit/820929062a2ba0104397bc01235ab58a9cff780e
- referenced here
-
https://github.com/mautrix/telegramgo/commit/124f0967ed195b5a380c9bd02e170ada9710dde3
-
https://github.com/mautrix/telegramgo/commit/4205047aab2e0639217148b5d125bfaab668bd8e
2025-06-27 20:03:37 -07:00
Adam Van Ymeren
0952df0244
all: respect/propagate errors from QueueRemoteEvent ( #110 )
2025-06-26 13:43:35 -07:00
Toni Spets
8ac519d1e5
connector: Disconnect in a goroutine on auth error
...
If we get bad creds on initial connect the lock is being held when the
callback is called.
2025-06-25 08:55:36 +03:00
Toni Spets
fa237a20f7
logging: Move gotd debug logs to trace
...
Zap doesn't have trace level logging so to make it less noisy we need to
shift them to trace.
2025-06-09 15:01:25 +03:00
Toni Spets
e7b87835b6
Fix a race between connect and disconnect
...
If we get an auth error during connect we did deadlock.
2025-06-06 10:57:07 +03:00
Toni Spets
3c3c3f1dec
client: Prefer contact name if exists
...
Don't allow TG user to override your own contact name for them after
they have been made a contact.
2025-05-30 13:22:57 +03:00
Toni Spets
0f36833e89
Revert "Revert "client: unblock connect without network""
...
This reverts commit ea4626107c .
Adds waiting support for initial connection established to avoid locking
up gotd. This isn't extremely pretty but should do the job for now.
2025-05-27 07:40:38 +03:00
Toni Spets
ea4626107c
Revert "client: unblock connect without network"
...
This reverts commit 14c784f2a2 .
2025-05-23 10:32:51 +03:00
Toni Spets
39c1b685d6
client: logout with timeout to API call to unblock it
2025-05-23 09:28:32 +03:00
Toni Spets
14c784f2a2
client: unblock connect without network
...
It'll still probably not race too much if disconnect gets called while
connecting is still stuck doing something.
2025-05-23 09:20:38 +03:00
Toni Spets
7e75c8ef83
media: make all media direct downloadable
...
The only exception is emojis.
Also changed direct download encoding field names to be more generic
when used in mixed manner depending on peer type.
Direct downloads are still somewhat inefficient as they require an API
round trip to succeed but we can cache things in the database if needed.
2025-05-07 06:43:51 +03:00
Toni Spets
7c13481ede
client: Handle connect/disconnect/auth races properly
...
When logging out, we should first handle network level logout and after
that ensure the client is disconnected before removing state to avoid
having event handling during disconnect from touching anything anymore.
I don't know why we nilled the client but since so many places use it
we'd rather get errors rather than panics if it's being used after
logging out but previous lifecycle fixes should avoid that.
2025-04-26 08:19:33 +03:00
Toni Spets
224b01e7a4
client: Wait for updates manager to finish on disconnect
2025-04-15 12:19:28 +03:00
Toni Spets
a64a178dc3
client: Don't try to reconnect with canceled context
2025-04-10 10:13:02 +03:00
Toni Spets
538f2a2ec0
client: Wait before returning from disconnect
2025-04-09 10:49:45 +03:00
Tulir Asokan
28d8276554
dependencies: update mautrix-go
2025-03-25 17:00:55 +02:00
Sumner Evans
1bc3a2538e
treewide: add copyright/license notices
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2025-03-05 10:16:50 -07:00
Sumner Evans
0712ca5d0c
dependencies: update go
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2025-02-17 14:13:12 -07:00
Tulir Asokan
386cfa4cfb
capabilities: update to new format
2025-01-10 21:17:10 +02:00
Sumner Evans
9e868e4614
connector: fix linking to premium messages
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2025-01-09 17:46:36 -07:00
Sumner Evans
ee0c2e4f68
connector/client: don't call disconnect on pipe error
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-09 16:17:06 -07:00
Sumner Evans
c8590ca402
connector/client: add more logging on Connect
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-09 15:12:15 -07:00
Sumner Evans
964ea69de7
connector/client: check for client context nil on logged in check
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-09 15:11:49 -07:00
Sumner Evans
2a7146d987
client: improve disconnection detection
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-06 14:20:45 -07:00
Sumner Evans
dc2216e60b
client: let connect send the bridge state on updates manager fail
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-05 13:09:48 -07:00
Sumner Evans
73934a0594
client: try reconnecting on update manager run error
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-05 13:07:01 -07:00
Sumner Evans
4d33af7f81
client: fix detection of bad credentials on connect
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-05 08:58:09 -07:00
Sumner Evans
80f17d5fbd
connector: send BAD_CREDENTIALS if error is an auth error
...
Previously, we were going into UNKNOWN_ERROR too aggressively
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-04 23:49:49 -07:00
Sumner Evans
83acac5175
connector/client: handle updates manager errors
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-04 15:21:55 -07:00
Sumner Evans
a1f58cad11
connector/client: ignore messages in more situations
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-03 09:01:41 -07:00
Sumner Evans
bf3e0ec8ab
connector: simplify some of the dispatcher handlers
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-02 15:53:43 -07:00
Nick Mills-Barrett
16040adc53
dependencies: update mautrix-go
2024-12-02 13:56:25 -07:00
Sumner Evans
8e994edbde
connector: only send UNKNOWN_ERROR if not pipe error
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-02 13:12:38 -07:00
Sumner Evans
54157de58f
connector: reconnect on broken pipe error
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-02 12:57:53 -07:00
Sumner Evans
7ce3dacf00
metadata: clear more things from user login metadata on auth error
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-12-02 12:24:49 -07:00
Sumner Evans
7bda4f7855
connector: humanise connection errors
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-25 17:22:11 -07:00
Sumner Evans
844f31827c
connector/client: don't explode if client not available on connection state change
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-20 15:33:55 -07:00
Sumner Evans
21ef73d69c
connector/client: add more logging to IsLoggedIn
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-20 14:39:12 -07:00
Sumner Evans
1f22aa2072
connector/client: make NormalizeURL not panic if message not found
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-18 08:39:08 -07:00
Sumner Evans
40f259da5e
directdownload: don't panic if user not logged in
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-08 02:34:52 -07:00
Sumner Evans
d1d3c18670
connector/client: update IsLoggedIn check
...
Signed-off-by: Sumner Evans <sumner.evans@automattic.com >
2024-11-08 02:13:48 -07:00