Commit graph

62 commits

Author SHA1 Message Date
748e851b39 Improve threads UX
/This is a squash-commit - the following is a rough summary of all sub-commits, written in style of commit messages (not necessarily those commits themselves), ie. short and in present tense./

* Document design choice to not bridge Discord threads as Matrix threads [by directly quoting Cadence]
* Alter thread-to-announcement, so that it replies in-thread [with this, Matrix users will get a list of almost all (exl. those that don't branch from anything) open threads on a given channel, whereas before it wasn't possible. Also features slight alterations to the text]
* Notify the user, whenever an in-thread message on Matrix is sent, that this isn't how they're supposed to do threads on OOYE
* Detect /thread being ran as a reply or in-thread to branch the thread from the relevant message
* Handle various /thread errors [notably being ran without args (infer the title if ran in the context above, simply show help if not)]
*  Whenever possible, direct the user to an already-existing thread-room [if /thread was ran as a reply or in-thread, or as part of the notification mentioned in point 3 (feat. a new utility method)]

AUXILIARY TYPE CHANGES (not always relevant to UX-improvement-related changes):
* Fix „boolean” being referred to as „bool” in types.d.ts
* Rename execute(event) in matrix-command-handler is now parseAndExecute(event) [and it is no longer of type CommandExecute, but has its own custom definition, because a) it has a different return now (returns what command was ran (needed for point 3 in section above) instead of always undefined and b) other params from CommandExecute (like ctx or words) weren't being used - quite the contrary, their values were only being created at that stage (as part of command parsing - hence the rename, too), so telling that they're values you pass into execute() was at least somewhat confusing]
* Further narrow-down the type of guard() in m2d event-dispatcher

TEST CHANGES:
* Create 7 new tests, all pass
* Update 4 existing threads, all pass
* Pass all other relevant tests [and almost all other tests, too - there are some issues with event2message for stickers, but given the fact that this commit does not touch the stickers subsystem in any way at all,  it does not seem like they are any way related to my changes and they must've been failing before]
* Do extensive manual testing and debugging
Co-authored-by: Guzio <guzekk@protonmail.com>
Co-committed-by: Guzio <guzekk@protonmail.com>
2026-03-02 15:17:08 +00:00
5002f3046a Convert emojihax to real emoji 2026-02-13 20:27:38 +13:00
35e9c9e1ea Add unlink space feature
Squashed commit of the following:

commit bd9fd5cd3c
Author: Elliu <elliu@hashi.re>
Date:   Sat Nov 15 15:32:18 2025 +0900

    Revert "fix matrix / db resource cleanup on space unlink"

    This reverts commit ccc10564f1.

commit eec5592938
Author: Cadence Ember <cadence@disroot.org>
Date:   Sat Nov 8 13:01:59 2025 +1300

    Dependency inject snow for testing

commit b45eeb150e
Author: Elliu <elliu@hashi.re>
Date:   Wed Nov 5 00:20:20 2025 +0900

    manually revert 3597a3b: "Factorize some of the space link/unlink sanity checks"

commit 0f2e575df2
Author: Elliu <elliu@hashi.re>
Date:   Wed Nov 5 00:04:38 2025 +0900

    on unbriding room, also demote powel level of bridge user in matrix room

commit ccc10564f1
Author: Elliu <elliu@hashi.re>
Date:   Wed Nov 5 00:04:13 2025 +0900

    fix matrix / db resource cleanup on space unlink

commit f4c1ea7c7f
Author: Elliu <elliu@hashi.re>
Date:   Tue Nov 4 23:54:41 2025 +0900

    /unlink-space: properly leave guild and clean DB

commit 5f0ec3b2c8
Author: Cadence Ember <cadence@disroot.org>
Date:   Sun Nov 2 22:31:14 2025 +1300

    Improve HTML to a state I'm happy with

commit 16309f26b3
Author: Elliu <elliu@hashi.re>
Date:   Sat Nov 1 22:24:51 2025 +0900

    add tests from /unlink-space endpoint

commit 5aff6f9048
Author: Elliu <elliu@hashi.re>
Date:   Sat Sep 6 20:05:18 2025 +0900

    Add /api/unlink-space implementation

commit dfc61594f6
Author: Elliu <elliu@hashi.re>
Date:   Sat Sep 6 19:59:44 2025 +0900

    Extract /api/unlink code to its own function

commit 3597a3b5ce
Author: Elliu <elliu@hashi.re>
Date:   Sat Sep 6 19:28:42 2025 +0900

    Factorize some of the space link/unlink sanity checks

commit 05d788e263
Author: Elliu <elliu@hashi.re>
Date:   Sat Sep 6 18:23:01 2025 +0900

    Add button to unlink a space

Co-authored-by: Cadence Ember <cadence@disroot.org>
2026-02-13 19:13:02 +13:00
64369f1054 Fix test 2026-02-09 13:22:45 +13:00
345b7d6135 Merge attachments with message when possible 2026-01-21 13:51:34 +13:00
abdul
1741bc0fa7 Fix webp animated emojis
https://discord.com/developers/docs/reference#image-formatting-cdn-endpoints
> WebP and AVIF formats must be requested as WebP.
2026-01-17 23:06:19 +13:00
505c41a35e More code coverage 2026-01-10 02:28:18 +13:00
55e0e5dfa1 Room version 12 and room upgrades 2026-01-07 02:43:20 +13:00
653e38a9d2 Interpret Matrix media spoilers 2025-12-06 03:10:51 +13:00
3fc51cef15 Add upgraded_timestamp to historical_channel_room 2025-12-01 16:38:38 +13:00
a441c476f8 Support multiple versions of rooms 2025-11-26 15:43:48 +13:00
d0f7d79d78 Fix duplicated data appearing on Matrix 2025-11-18 14:48:59 +13:00
954d41269c Store directs in database rather than account data 2025-08-21 11:30:23 +12:00
2614493646 Look harder for username data 2025-08-04 18:10:08 +12:00
9a33ba3ed2 Fix evil encrypted file event with null url 2025-07-21 12:46:51 +12:00
557b7653e2 Test coverage for message info API 2025-06-08 22:29:10 +12:00
7a59f48c0a New emoji storage and bug fixes in setup 2025-05-12 14:29:34 +12:00
62be5f7091 Code coverage for web settings 2025-02-21 16:41:43 +13:00
a90d3b9055 Code coverage for link/unlink endpoints 2025-02-07 16:56:10 +13:00
a29d019d17 Make read-only Discord channels read-only on Matrix 2025-02-05 16:57:45 +13:00
f7e2c89e65 Test setup for new web pages 2025-02-05 14:57:05 +13:00
5b06d5984a Do cache space members in member_cache 2025-01-20 02:33:24 +13:00
8ad299b04c Add foreign keys to database 2025-01-17 11:33:29 +13:00
c599dff590 Tests and coverage for web 2024-12-24 01:06:19 +13:00
1b539cfa64 Forwarding text messages 2024-11-01 16:39:56 +13:00
49948ae2c1 Support forwarded messages 2024-10-31 17:34:25 +13:00
bad8c5b8c2 Test invite interaction & code coverage 2024-09-30 00:51:55 +13:00
ee266f844a Move reaction_part to new events when possible 2024-08-28 17:18:50 +12:00
5af7d6bf42 Add test for a generated embed on a reply 2024-08-28 11:51:02 +12:00
5d91f999f2 Make power migration testable 2024-08-28 02:53:27 +12:00
71c553a9cf Test cases for bridging author command metadata 2024-08-28 02:05:51 +12:00
b8793dae0f Sync new power system to newly created rooms 2024-08-26 01:42:56 +12:00
2c93ff1e6d Match old and new formats of reply rep 2024-08-16 12:04:09 +12:00
5c48645334 m->d: Suppress embeds for links in reply preview 2024-08-16 10:25:37 +12:00
d01c888d02 Support embed generate MESSAGE_UPDATE events 2024-03-15 15:54:13 +13:00
47ac49a855 Rearrange code (self-review) 2024-03-04 17:02:38 +13:00
18ef337aef Add test case for unreachable emojis
This test is for commit 6e41f85
2024-02-23 11:48:23 +13:00
19a34a6385 d->m: PK reply to attachment now uses native reply 2024-02-16 10:06:30 +13:00
369e0862e5 m->d: Fix reply previews saying undefined 2024-02-14 11:04:54 +13:00
e999fcf819 m->d: test: Line break between reply and quote msg 2024-02-13 23:03:56 +13:00
7756a34a5f m->d: Gracefully handle replies to redacted event 2024-02-13 22:58:21 +13:00
c7fb6fd52e Improve test coverage 2024-02-02 15:55:02 +13:00
f48c1f3f31 PK: Fix mentions/replies using UUID 2024-01-31 13:09:39 +13:00
f3cacc89fd m->d: Code coverage for invalid events 2024-01-19 16:38:31 +13:00
aa9c2cc0c7 Reduce surface for test to break 2024-01-19 12:48:07 +13:00
0237e6d8fd Improve code coverage for video 2024-01-19 12:39:07 +13:00
011889216b Add lottie sticker message test data 2024-01-18 17:04:00 +13:00
afbbe0da3d Fix more edge-case embed formatting 2023-10-28 00:24:42 +13:00
c24752625d Split part and reaction_part
Now, reactions should always end up on the bottom of a message group,
instead of sometimes being in the middle.
2023-10-14 22:11:29 +13:00
b7f90db20a Fix reply preview "undefined" on embed description 2023-10-14 19:27:45 +13:00