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

Closed
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.
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
Author
Owner

Closing this as it is not expected to be done for a while and needs to be brought back to the drawing board.

Closing this as it is not expected to be done for a while and needs to be brought back to the drawing board.
nex closed this pull request 2025-08-01 23:25:27 +00:00
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

Pull request closed

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.