Commit Graph

29 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 a9a267bc0d directmedia: handle webpage previews as well 2025-05-27 14:39:47 +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
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 68f4b0e21f direct media: don't panic if userLogin or userLogin.Client is nil
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-12-04 15:21:55 -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
Scott Weber 6100335809 deps/mautrix: upgrade 2024-11-06 17:36:10 +01:00
Sumner Evans 13f21a7c70 media: implement streaming for direct downloads
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-10-22 11:37:59 -06:00
Sumner Evans e1a56778f5 media: default to JPEG MIME-type for direct-downloaded images
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-09-27 16:14:28 -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
Tulir Asokan ff48398430 ids: add support for split portals 2024-09-14 12:50:31 +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 83695b4336 directdownload: include receiver in media ID
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-07 11:18:59 -06:00
Sumner Evans e0194f7621 typing: support TG <-> Matrix
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-08-07 11:01:24 -06:00
Sumner Evans 34832c7ff7 channels: handle messages Matrix <-> TG
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-15 15:23:50 -06:00
Sumner Evans 62d6145c14 stickers: support receiving and converting
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-10 10:45:56 -06:00
Sumner Evans 58cc638058 media: major refactor of downloading/direct URL
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-09 23:03:15 -06:00
Sumner Evans a63f264804 reactions: support custom emojis
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-09 14:04:25 -06:00
Sumner Evans 5d39fc8c5f pkg/download -> pkg/media
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-07-08 08:47:30 -06:00
Sumner Evans 55a9375938 media: support thumbnails
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-25 13:52:55 -06:00
Sumner Evans a24079494d directdownload: fix logging and remove outdated comment
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-24 10:57:50 -06:00
Sumner Evans 499678d092 media: handle location shares
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-20 18:42:09 -06:00
Sumner Evans c0c7ad7d0f media: handle contact shares
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-20 18:42:09 -06:00
Sumner Evans 891750592d converter: handle link previews TG -> Matrix
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-20 18:42:09 -06:00
Sumner Evans 16706d8338 media: support documents
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-20 18:42:09 -06:00
Sumner Evans 7963e52405 direct media: implement direct download for photos
Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
2024-06-19 12:47:41 -06:00