Commit Graph

27 Commits

Author SHA1 Message Date
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
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
Nick Mills-Barrett 10b8c4b635 chatinfo: log when chats have no or unknown photo types 2025-04-07 13:58:53 +01: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
Tulir Asokan 386cfa4cfb capabilities: update to new format 2025-01-10 21:17:10 +02:00
Sumner Evans f4052dcfd3 connector: set IsSuperGroup on dialog sync
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2025-01-09 18:59:13 -07:00
Sumner Evans 07a8553b22 connector: fix chat info for Saved Messages chat
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-31 14:23:18 -06:00
Sumner Evans ea9bd01d06 connector/chatinfo: allow bridging non-supergroup channels with lots of subscribers
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-30 10:45:23 -06:00
Sumner Evans 229efdd487 chatinfo: handle forbidden channels/chats without panicking
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-24 10:45:32 -06:00
Sumner Evans a573740b9a media/transfer: add function to directly download bytes
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-22 09:21:56 -06:00
Sumner Evans 03c7028460 power levels: prevent sending to blocked users
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-09 09:57:02 -06:00
Sumner Evans 7d9836c86b power levels: bridge rights for group chats
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-03 11:16:18 -06:00
Sumner Evans 6f4e32fad0 client: handle group chat and channel creation events
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-01 11:10:12 -06:00
Sumner Evans c6e96682b6 treewide: separate user and channel namespaces
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-09-25 07:16:05 -06:00
Sumner Evans 3b6af95976 connector: support messages sent by a channel
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2024-09-03 13:34:13 -06:00
Sumner Evans 15b0dc51b3 snc: implement resolving Telegram IDs, usernames, and phone numbers
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-22 12:18:21 -06:00
Tulir Asokan 9d8f162f41 chatinfo: override name for saved messages 2024-08-22 18:26:08 +03:00
Tulir Asokan b25c09fc53 store: refactor access hash and session tables
* Move sessions to user_login metadata, as that data rarely changes after login.
* Merge user and channel access hashes. Those IDs don't conflict.
* Split usernames into a new table to allow better `ON CONFLICT` updates
  (when a username moves to another entity, we want the old row to be replaced).
  Usernames also don't need to be scoped to a login.
2024-08-22 17:54:10 +03:00
Tulir Asokan e611c87342 all: add some todos and fix small issues 2024-08-22 17:53:50 +03:00
Sumner Evans 8b8b689187 sync: add on-command sync
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-22 07:57:28 -06:00
Sumner Evans 0670c2b2bc updates: add wrapper for API calls to update users
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-22 07:57:28 -06:00
Sumner Evans 56f83315ed backfill: implement
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-22 07:57:28 -06:00
Sumner Evans 6c4c0f4821 connector/chatinfo: use access hash for user
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-20 08:54:34 -06:00
Sumner Evans a86c2c2544 read receipts: bridges TG <-> Matrix
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-08 15:51:27 -06:00
Sumner Evans 838f291220 store: move the access_hash and username to separate per-user table
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-08 12:12:17 -06:00
Sumner Evans fe550da243 metadata: allow disabling channel memebr sync
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-18 08:50:35 -06:00
Sumner Evans a0d88da480 metadata: add pagination config for members initial sync
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-17 16:44:53 -06:00