]> git.cworth.org Git - turbot/commitdiff
Make the puzzle's name a link to the sheet
authorCarl Worth <cworth@cworth.org>
Thu, 22 Oct 2020 22:07:19 +0000 (15:07 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 22 Oct 2020 22:46:40 +0000 (15:46 -0700)
Otherwise, there's just a wall of "Channel" and "Sheet" links which is
disorienting.

turbot/events.py

index 38199e2270f4a08b8104326ecc3b5939b7dd5857..bbec056a985b34bfe73a9202ca7ff955415b4d3c 100644 (file)
@@ -35,13 +35,13 @@ def puzzle_block(puzzle):
     links = []
     if url:
         links.append("<{}|Puzzle>".format(url))
-    if channel_id:
-        links.append("<{}|Channel>".format(channel_url(channel_id)))
     if sheet_url:
         links.append("<{}|Sheet>".format(sheet_url))
 
-    puzzle_text = "{}{} {} ({})".format(
-        status_emoji, solution_str, name, ', '.join(links)
+    puzzle_text = "{}{} <{}|{}> ({})".format(
+        status_emoji, solution_str,
+        channel_url(channel_id), name,
+        ', '.join(links)
     )
 
     return section_block(text_block(puzzle_text))