Skip to content

Commit b81b841

Browse files
committed
Document public rooms
1 parent c3e6ec8 commit b81b841

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

sogs/routes/views.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
@views.get("/")
1919
def serve_index():
20+
"""
21+
Publicly accessible URL that displays a list of public rooms to a web browser. This isn't a
22+
normal SOGS client endpoint, but rather a convenience web page for people who follow a SOGS
23+
pseudo-URL.
24+
"""
2025
rooms = get_accessible_rooms()
2126
if len(rooms) == 0:
2227
return render_template('setup.html')
@@ -29,6 +34,11 @@ def serve_index():
2934

3035
@views.get("/r/<Room:room>/")
3136
def view_room(room):
37+
"""
38+
Publicly accessible URL that displays a room (including recent messages) to a web browser. This
39+
isn't a normal SOGS client endpoint, but rather a convenience web page for people who follow a
40+
SOGS pseudo-URL, that displays the SOGS URL and QR code along with a list of recent messages.
41+
"""
3242
if not room.default_read:
3343
abort(http.FORBIDDEN)
3444

@@ -41,6 +51,12 @@ def view_room(room):
4151

4252
@views.get("/r/<Room:room>/invite.png")
4353
def serve_invite_qr(room):
54+
"""
55+
URL that generates a SOGS open group URL in QR code format for consumption by a mobile device.
56+
This isn't a normal SOGS client endpoint, but rather part of the a convenience web page for
57+
people who view the SOGS URL in a browser and want to scan the URL into another device (i.e.
58+
mobile Session).
59+
"""
4460
if not room.default_read:
4561
abort(http.FORBIDDEN)
4662

0 commit comments

Comments
 (0)