-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MSC4185: Event Visibility API #17973
base: develop
Are you sure you want to change the base?
Implement MSC4185: Event Visibility API #17973
Conversation
|
async def on_GET( | ||
self, request: SynapseRequest, appservice_id: str, room_id: str, user_id: str, event_id: str | ||
) -> Tuple[int, bool]: | ||
logger.info('on_GET') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover debug log
@@ -143,6 +143,8 @@ async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]: | |||
"fi.mau.msc2815": self.config.experimental.msc2815_enabled, | |||
# Adds a ping endpoint for appservices to check HS->AS connection | |||
"fi.mau.msc2659.stable": True, # TODO: remove when "v1.7" is added above | |||
# Adds Event visibility API | |||
"net.tadzik.msc4185": self.config.experimental.msc4185_enabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the org.matrix.msc4185
unstable identifier (same question for the endpoint)? Is there some prior art somewhere else?
logger = logging.getLogger(__name__) | ||
|
||
|
||
class AppserviceEventVisibilityrestServlet(RestServlet): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the alternative mentioned in matrix-org/matrix-spec-proposals#4185 (comment) cover your use case? Feels like a new endpoint isn't necessary
event = await self.store.get_event(event_id, check_room_id=room_id) | ||
filtered = await filter_events_for_client(self._storage_controllers, user_id, [event]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have some sanity check test cases. We don't need to re-test every scenario that filter_events_for_client(...)
covers but would be good to have a true
and false
test case.
Relevant MSC4185
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.(run the linters)