Implement MSC4367 room directory
This commit is contained in:
@@ -56,7 +56,7 @@ async def spec_versions():
|
||||
@client.route("/_matrix/client/v3/admin/whois/<user>")
|
||||
@client.route("/_matrix/client/r0/admin/whois/<user>")
|
||||
async def whois(user):
|
||||
if userId.startswith("@"):
|
||||
if user.startswith("@"):
|
||||
return jsonify({
|
||||
"devices": {
|
||||
"": {
|
||||
@@ -643,15 +643,11 @@ async def mutual_rooms():
|
||||
async def presence(user):
|
||||
if request.method == "PUT":
|
||||
return jsonify({})
|
||||
|
||||
return jsonify({
|
||||
"presence": "online"
|
||||
})
|
||||
|
||||
return jsonify({"presence": "online"})
|
||||
|
||||
|
||||
@client.route("/_matrix/client/v3/publicRooms", methods=["GET", "POST"])
|
||||
@client.route("/_matrix/client/r0/publicRooms", methods=["GET", "POST"])
|
||||
async def room_directory():
|
||||
return jsonify({
|
||||
"chunk": [],
|
||||
"total_room_count_estimate": 0
|
||||
})
|
||||
return jsonify(globals.room_dir)
|
||||
|
||||
Reference in New Issue
Block a user