Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update graph.py to use new federation urls
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Aug 13, 2014
1 parent 80c056c commit 08ed4cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def make_graph(pdus, room, filename_prefix):
def get_pdus(host, room):
transaction = json.loads(
urllib2.urlopen(
"http://%s/context/%s/" % (host, room)
"http://%s/matrix/federation/v1/context/%s/" % (host, room)
).read()
)

Expand Down

1 comment on commit 08ed4cc

@MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented on 08ed4cc Feb 1, 2021

Choose a reason for hiding this comment

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

This code used to be handled by synapse/storage/pdu.py#L161-L169 but the endpoint was removed in #12

def _get_all_pdus_from_context(self, txn, context):
query = (
"SELECT pdu_id, origin FROM %s "
"WHERE context = ?"
) % PdusTable.table_name
txn.execute(query, (context,))
return self._get_pdu_tuples(txn, txn.fetchall())

But looks to be replaced by GET /_matrix/client/r0/rooms/{roomId}/context/{eventId} which is covered by Synapse in synapse/rest/client/v1/room.py#L627

Please sign in to comment.