Skip to content
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

Draft: Synapse and MSC2716 edits (explore the DAG) #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MadLittleMods
Copy link

@MadLittleMods MadLittleMods commented Feb 2, 2021

Edits to make TARDIS work with Synapse while writing Complement tests for MSC2716.

Changes needed in Synapse

In Synapse, comment out all of the dropped fields in the event serialization in Synapse synapse/events/utils.py#L253-L259.

Changes needed in your Complement test

contextRes := alice.MustDoFunc(t, "GET", []string{"_matrix", "client", "r0", "rooms", roomID, "context", eventStar}, client.WithContentType("application/json"), client.WithQueries(url.Values{
	"limit": []string{"100"},
}))
contextResBody := client.ParseJSON(t, contextRes)
logrus.WithFields(logrus.Fields{
	"contextResBody": string(contextResBody),
}).Error("context res")
Previous before functional client API
contextRes := alice.MustDoRaw(t, "GET", []string{"_matrix", "client", "r0", "rooms", roomID, "context", eventStar}, nil, "application/json", url.Values{
	"limit": []string{"100"},
})
contextResBody := client.ParseJSON(t, contextRes)
logrus.WithFields(logrus.Fields{
	"contextResBody": string(contextResBody),
}).Error("context res")

Copy the output of that log line and paste it in the src/context-response.json file. (Replace the \" with ")

Edits to make TARDIS work with Synapse while writing Complement tests for [MSC 2716](matrix-org/matrix-spec-proposals#2716).

 - matrix-org/synapse#9247
 - matrix-org/complement#68
@@ -0,0 +1,629 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This data produces the following chart:

MadLittleMods added a commit to matrix-org/synapse that referenced this pull request Feb 2, 2021
@MadLittleMods MadLittleMods changed the title Draft: Synapse and MSC2716 edits Draft: Synapse and MSC2716 edits (explore the DAG) Feb 2, 2021
@@ -259,7 +313,9 @@ window.onload = async (event) => {

// Add text to nodes with border
nodes.append('text')
.text((d) => d.data.type)
.text((d) => {
return `${d.data.type} - ${d.data.content && d.data.content.body} (depth=${d.data.depth})`;
Copy link
Author

@MadLittleMods MadLittleMods Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated DAG visualization with depth. See matrix-org/complement#68 (comment) for full context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant