Skip to content

Commit 84b17cf

Browse files
jonjensenshowell
authored andcommitted
Correct archive_message_url which needs to include /topic/ in the path
1 parent fcaec1e commit 84b17cf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/url.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ def archive_topic_url(site_url, html_root, sanitized_stream_name, sanitized_topi
4646
return f'{base_url}/stream/{sanitized_stream_name}/topic/{sanitized_topic_name}.html'
4747

4848
def archive_message_url(site_url, html_root, sanitized_stream_name, sanitized_topic_name, msg_id):
49-
base_url = urllib.parse.urljoin(site_url, html_root)
50-
return f'{base_url}/{sanitized_stream_name}/{sanitized_topic_name}#{msg_id}'
49+
'''
50+
http://127.0.0.1:4000/archive/stream/213222-general/topic/newstreams.html#1234567
51+
'''
52+
topic_url = archive_topic_url(site_url, html_root, sanitized_stream_name, sanitized_topic_name)
53+
return f'{topic_url}#{msg_id}'
5154

5255
## String cleaning functions
5356

0 commit comments

Comments
 (0)