Commit graph

218 commits

Author SHA1 Message Date
648472d305 Merge remote-tracking branch 'cadence/main' into mergable-fr-fr 2026-10-14 09:59:19 +02:00
866a496582 Support component URL previews 2026-10-14 16:13:45 +13:00
6586188fa3 another conflict nooooo 2026-10-13 12:56:46 +02:00
7902b91c38 Fix time formatting in different node versions 2026-10-13 23:46:04 +13:00
c196bef0ba Add tests for @room mention roles conversion 2026-10-13 23:33:14 +13:00
57226cfdc8 Watch me absolutely break this bot by merging in stuff without really reviewing what changed, beyond resolving the 3 conflicts
I mean... The tests pass *almost* fine (the 3 that fail seem unrelated, but I gotta make double-sure), but I'm sure I didn't cover all of my changes with test, soooo...

Anyway, looking forward to getting crucified ny my friends, when the bot inevitably implodes, and spams all over our double-bridged Messenger group again.

SOLVED CONFLICTS WERE:
* src/m2d/event-dispatcher.js (I think we both had the same idea and both added the same thing? Something about retrigger.)
* src/web/pug/guild.pug (the whole file, somehow, but the Conflict Editor on the other hand said that they looked the same, so idk)
*  test/ooye-test-data.sql (we both added a line at the end of the big block of Snowfalke pairs, near line 100)

OTHER CHANGES THAT GOT „AUTO-MERGED” (oh no...):
* src/d2m/actions/create-room.js
* src/d2m/event-dispatcher.js
* src/m2d/actions/send-event.js
* src/m2d/converters/event-to-message.js
* src/matrix/matrix-command-handler.js
* src/matrix/utils.js
* src/types.d.ts
* src/web/routes/guild.js
2026-10-12 14:37:46 +02:00
c25b5a19c6 Support Discord @time 2026-10-07 22:52:42 +13:00
5794bee128 Support Discord game mentions 2026-10-04 22:19:35 +13:00
2959fd8ae3 Render pug blocks without a separate template 2026-09-15 23:42:06 +12:00
021f02f981 d->m: Try too-large PNGs as JPEG for upload
Large PNGs were almost certainly originally JPEG photos that were
converted to PNG by the user copy-pasting.
If the PNG is just supposed to be that large, you can still get the
original through the external URL option.

Had to change _removeExpiryParams to be based on URL parsing instead of
regexp because regexp didn't work with &format=jpeg on the end.
2026-09-14 00:30:03 +12:00
1bb22e315a Fix m->d m.mentions for webhooks 2026-09-08 23:53:07 +12:00
cf12293d5c Allow anyone to respond to polls 2026-08-20 12:58:59 +12:00
c7dbd17209 Move embed via line to footer 2026-08-10 19:43:14 +12:00
e2ab9fa9bf Improve PK ping message 2026-06-03 00:02:48 +12:00
eb676256e4 Fix Discord mentions with extra HTML attributes 2026-05-14 18:20:32 +12:00
92d6ada71b Merge tag 'v3.5.1'
Remove AI joke
2026-05-10 20:41:21 +12:00
41c2131061 Merge branch 'main' into mergable-fr-fr 2026-04-26 12:54:34 +00:00
d8fb4be509 d->m: Fix reply to user join message 2026-04-24 21:23:14 +12:00
f3330826d9 Resolved merge conflicts 2026-04-01 20:47:56 +00:00
e7cbfb9fc9 Remove AI joke
This reverts commit 201814e9f4.
2026-03-29 15:43:23 +13:00
nemesio65
12f4103870 d2m: Create voice channels as call rooms 2026-03-28 11:46:08 +13:00
5c9e569a2a Support channel follow messages 2026-03-25 15:29:18 +13:00
201814e9f4 Update dependencies 2026-03-23 21:22:33 +13:00
0dac3d2898 Internal language adjusted 2026-03-20 00:53:09 +13:00
876d91fbf4 Remove sims when the Discord user leaves 2026-03-19 14:30:10 +13:00
afa8ba2237 Emergency sync
I was not supposed to do more pulling, but I started seeing some instability and I want to see if it's me or main.
2026-03-14 07:10:09 +00:00
ff022e8793 Combine additional embed images into same event 2026-03-13 11:12:44 +13:00
Bea
f5ee130463 Handle expired invites & fix test registration (#73)
This PR addresses a bridge crash discovered while backfilling old channels, alongside a wee QoL fix for the test suite.

* **Expired Events (`d2m`):** Wraps Discord scheduled event/invite link lookups in a try-catch block. If a link is expired (404 or Discord error 10006), the bridge now posts a fallback `m.notice` rather than throwing an error and halting message conversion.
* **Test Suite Setup:** Updates `test.js` to initialize the mock registration object using `getTemplateRegistration()` preventing test runner crashes when running without a local `registration.yaml` file.

Co-authored-by: Cadence Ember <cadence@disroot.org>
Reviewed-on: cadence/out-of-your-element#73
Co-authored-by: Bea <beanie@theargo.space>
Co-committed-by: Bea <beanie@theargo.space>
2026-03-08 22:11:28 +00:00
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
228766cec0 Change how edit timestamps are treated again 2026-02-12 01:27:49 +13:00
d1b0fa48cf Add tests for emoji sheet; style and nits 2026-02-11 02:42:10 +13:00
64369f1054 Fix test 2026-02-09 13:22:45 +13:00
b52b2de205 Customise format for Klipy GIFs 2026-02-04 00:45:23 +13:00
15aa6ed502 Highlight scanned mentions on Matrix side 2026-02-03 22:41:03 +13:00
f287806bcd Remove smalltext from non-bots
I don't like it.
2026-02-03 01:23:12 +13:00
e3e38b9f24 Components v2 support 2026-01-30 19:22:13 +13:00
e565342ac8 initial polls support (not exactly working) 2026-01-25 14:33:09 +13:00
90fcbd0ddc Update Discord libraries 2026-01-21 14:33:24 +13:00
345b7d6135 Merge attachments with message when possible 2026-01-21 13:51:34 +13:00
756e8e27ad Make registration more consistent 2026-01-21 01:59:54 +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
045fdfdf27 General code coverage 2026-01-09 03:49:32 +13:00
4bea696a5a setUserPower should account for room version 12 2026-01-07 15:38:09 +13:00
55e0e5dfa1 Room version 12 and room upgrades 2026-01-07 02:43:20 +13:00
e4d0838af5 Support creating v12 rooms 2025-12-16 02:15:17 +13:00
239568a8e5 Fully remove failed experiment 2025-12-16 00:34:37 +13:00
653e38a9d2 Interpret Matrix media spoilers 2025-12-06 03:10:51 +13:00