Commit graph

886 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
b90592cbe9 Prevent merge conflicts once again 2026-03-02 12:59:20 +00:00
c68bac5476 Document encryption as unsupported 2026-03-01 22:05:46 +13:00
5a0e7f6a66 Prevent more merge conflicts 2026-02-28 13:47:49 +00:00
e275d4c928 Add script to estimate total channel file size 2026-02-27 18:35:48 +13:00
780154fd09 Bots with Administrator may access all channels 2026-02-27 18:34:30 +13:00
ea261e825b Slashes not allowed in MXID 2026-02-27 18:33:29 +13:00
e146faced1 Prevent merge conflicts 2026-02-25 09:31:41 +00:00
d1aa8f01e7 Change sticker URL and stream response 2026-02-25 18:21:35 +13:00
Abdul
9b3707baa1 Link sticker instead of file upload 2026-02-25 17:47:01 +13:00
411491b405 Remove live dependency on cadence.moe 2026-02-21 12:04:42 +13:00
aedd30ab4a Update "m.relates_to" type definition @ types.d.ts
* To better reflect reality ("m.in_reply_to" will not always be present - it's not (always?) found on "rel_type":"m.replace" relation-events)

* To support "rel_type":"m.replace" relation-events (added "m.replace" option to existing key "rel_type" and a new "is_falling_back" key)

AFFECTED TYPES: M_Room_Message, M_Room_Message_File, M_Room_Message_Encrypted_File

BREAKS: Nothing, as .d.ts files don't affect buisness logic. In terms of lint errors: Marking "m.in_reply_to" as optional is indeed technically a "breaking change" (TypeScript may complain about „is probably undefined” in places where it didn't before), but from early "testing" (ie. looking at VSCode's errors tab), it doesn't seem like anything broke, as no file that imports any of those 3 types (Or their Outer_ counterparts) has „lit up” with errors (unless I missed something). There was one type error found in m2d/converters/event-to-message.js, at line 1009, but that seemed unrelated to types.d.ts - nevertheless, that error was also corrected in this commit, by adding proper type annotations somewhere else in the affected file.
2026-02-19 17:48:32 +00:00
2c7831c587 Small TypeScript coverage expansion
* The guard() function in m2d/event-dispatcher.js no longer takes (any, any), but a string and a function.

* m2d/send-event.js no longer complains that res.body has some missing fields. It would appear as though those missing fields weren't revelant to the fromWeb() function (into which res.body is passed), given that this code worked before and still contunes to work, so I just @ts-ignore'd res.body

This commit's developer's off-topic personal comment, related to this commit: This has nothing to do with improving thread UX, even tho this is what I was supposed to work on. However, in my attempts to discover in what file should I start, I stumbled upon those errors from m2d/send-event.js, so I fixed them. And after establishing that m2d/event-dispatcher.js is the file that I'm looking for, I also noticed that guard()'s @parm definitions could be improved, so I did that. Now - back to thread work...
2026-02-19 16:19:39 +00:00
ae6b730c26 Update .gitignore 2026-02-19 13:03:16 +00:00
9f9cfdb534 Allow namespace prefix to be empty string 2026-02-17 14:03:57 +13:00
ee583fddbd Fix server names with numbers in them 2026-02-17 12:56:18 +13:00
0cd7e1c336 Allow for custom additions to webroot 2026-02-17 12:54:50 +13:00
e779b41072 Fix possible undefined property access 2026-02-15 12:34:08 +13:00
09ea942307 Remove deprecated db management 2026-02-14 22:47:38 +13:00
c55e6c6115 v3.4 2026-02-14 20:20:19 +13:00
14de436054 Add docker policy 2026-02-14 20:13:46 +13:00
b5143bfe1f Use same invite logic for display and for linking 2026-02-14 00:33:02 +13:00
08323f4512 More consistency for invite records table
- Autojoined child spaces are recorded as invited
- Update entry when reinvited
- Delete entry when uninvited or removed from room
- Allow linking with spaces you moderate, even if you didn't invite
- Store power levels immediately for new invited rooms
  - Mark members as missing profile in this case
- Only delete from invite table if it left the space
2026-02-13 21:59:17 +13:00
5002f3046a Convert emojihax to real emoji 2026-02-13 20:27:38 +13:00
676cab0dc8 Use smalltext for interaction header 2026-02-13 20:27:25 +13:00
c971ca3e3d Use radios/checkboxes for poll voting modal 2026-02-13 19:31:28 +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
1defd83fde Sync create polls permission from Discord 2026-02-12 19:43:29 +13:00
e54536d965 Check for members gateway intent as well
It was reported that this is required for Log in with Discord to work.
2026-02-12 19:24:50 +13:00
8ea29d6c27 Fix link escaping breaking with suppressed links 2026-02-12 16:01:48 +13:00
0d574c1370 Fix PluralKit replies (properly) 2026-02-12 13:46:50 +13:00
228766cec0 Change how edit timestamps are treated again 2026-02-12 01:27:49 +13:00
7ebe8aa042 Fix backfill script 2026-02-11 12:21:54 +13:00
6df931f848 Check if we got rugpulled while sending 2026-02-11 11:49:45 +13:00
314f37f640 Add newline at end of registration to help shells 2026-02-11 11:49:35 +13:00
cd0b8bff2b Add reset web password script 2026-02-11 11:36:51 +13:00
c4909653aa Fix typecheck 2026-02-11 11:31:27 +13:00
33eef25cf1 Restore as.listen() during setup 2026-02-11 10:18:32 +13:00
c8b20719db Move poll-star-avatar file endpoint 2026-02-11 02:57:45 +13:00
d1b0fa48cf Add tests for emoji sheet; style and nits 2026-02-11 02:42:10 +13:00
abdul
c0d82754b0 Link instead of upload emoji sprite sheets 2026-02-11 02:42:05 +13:00
6b4123b845 More accurate flags check in setup 2026-02-11 01:10:31 +13:00
dbfa9d0f2b Sync PK member profile on first message
First time a PK member sends a message in the channel, Discord sends a
MESSAGE_UPDATE with the proper avatar data for them. OOYE's speedbump
means sending this message will actually take the edit message path.
The edit message path previously did not force a profile sync. This is
why the Matrix profile did always show up after their second message,
because that message was not updated and took the send path.
2026-02-10 16:42:02 +13:00
0ed3ef68f1 Fix PluralKit replies 2026-02-10 16:35:03 +13:00
279e379d77 The database really works better if you query it 2026-02-10 16:34:47 +13:00
64369f1054 Fix test 2026-02-09 13:22:45 +13:00
e66822e94b Make sure written mentions do not match in URLs 2026-02-09 13:22:36 +13:00
b463e1173b Fallback text for Matrix poll end events
Right now this doesn't seem to show up on any clients because extensible
events is a total mess, but if you did want to code a client that shows
this fallback without bothering to code real support for polls, you are
easily able to do that. Just pretend the poll end event is a
m.room.message and render it like usual.
2026-02-05 01:00:06 +13:00
Ellie Algase
564d564490 Add command to see Matrix results mid-poll
Co-authored-by: Cadence Ember <cadence@disroot.org>
2026-02-05 00:59:36 +13:00
Ellie Algase
52d9c6fea8 Fix poll results being double-bridged
Oddly, this would only occur for the first poll in a channel.
2026-02-04 13:02:43 +13:00