WIP: feat: Ask remote servers for individual unknown events #899

Draft
nex wants to merge 1 commit from nex/feat/pins-backfill into main
Owner

This change allows us to use /_matrix/federation/v1/get_event/{eventId} to fetch individual events that we may not have. This is similar to backfill, except it only retrieves an event by its ID, rather than fetching history.

This PR also makes use of this by making /_matrix/client/v3/rooms/{roomId}/event/{eventId} endpoint try to fetch the event locally, falling back to a backfill request if it fails. This means users can fetch pins from before they joined, in the event their server doesn't already have them locally.

This change allows us to use [`/_matrix/federation/v1/get_event/{eventId}`](https://spec.matrix.org/unstable/server-server-api/#get_matrixfederationv1eventeventid) to fetch individual events that we may not have. This is similar to backfill, except it only retrieves an event by its ID, rather than fetching history. This PR also makes use of this by making [`/_matrix/client/v3/rooms/{roomId}/event/{eventId}`](https://spec.matrix.org/unstable/client-server-api/#get_matrixclientv3roomsroomideventeventid) endpoint try to fetch the event locally, falling back to a backfill request if it fails. This means users can fetch pins from before they joined, in the event their server doesn't already have them locally.
nex added the
Enhancement
Matrix/Client
Matrix/Federation
labels 2025-07-08 16:14:37 +00:00
nex added 1 commit 2025-07-08 16:14:37 +00:00
feat: Ask remote servers for individual unknown events
All checks were successful
Release Docker Image / define-variables (push) Successful in 12s
Checks / Prefligit / prefligit (push) Successful in 20s
Checks / Rust / Format (push) Successful in 51s
Checks / Rust / Clippy (push) Successful in 3m32s
Checks / Rust / Cargo Test (push) Successful in 4m57s
Checks / Prefligit / prefligit (pull_request) Successful in 33s
Documentation / Build and Deploy Documentation (pull_request) Successful in 47s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 13m10s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 13m28s
Release Docker Image / merge (push) Successful in 31s
89e2faaa8e
Author
Owner

This looks to cause really weird issues with backfill

This looks to cause really weird issues with backfill
nex changed title from feat: Ask remote servers for individual unknown events to WIP: feat: Ask remote servers for individual unknown events 2025-07-08 16:15:20 +00:00
Owner

This should probably skip adding the event to the timeline, and only do that on actual backfill

This should probably skip adding the event to the timeline, and only do that on actual backfill
All checks were successful
Release Docker Image / define-variables (push) Successful in 12s
Checks / Prefligit / prefligit (push) Successful in 20s
Required
Details
Checks / Rust / Format (push) Successful in 51s
Required
Details
Checks / Rust / Clippy (push) Successful in 3m32s
Required
Details
Checks / Rust / Cargo Test (push) Successful in 4m57s
Required
Details
Checks / Prefligit / prefligit (pull_request) Successful in 33s
Required
Details
Documentation / Build and Deploy Documentation (pull_request) Successful in 47s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 13m10s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 13m28s
Release Docker Image / merge (push) Successful in 31s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin nex/feat/pins-backfill:nex/feat/pins-backfill
git checkout nex/feat/pins-backfill
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: continuwuation/continuwuity#899
No description provided.