mirror of https://gitlab.com/bashrc2/epicyon
Conversation redirect
parent
5221c953c3
commit
067ce6a4c2
|
@ -60,7 +60,7 @@ def logout_redirect(self, redirect: str, calling_domain: str) -> None:
|
|||
self.server.i2p_domain) + \
|
||||
redirect
|
||||
print('WARN: redirect was not an absolute url, changed to ' +
|
||||
redirect)
|
||||
redirect + ' ' + calling_domain)
|
||||
|
||||
quot_redirect = _quoted_redirect(redirect)
|
||||
self.send_response(303)
|
||||
|
@ -77,12 +77,16 @@ def redirect_headers(self, redirect: str, cookie: str,
|
|||
calling_domain: str,
|
||||
code: int) -> None:
|
||||
if '://' not in redirect:
|
||||
redirect = get_instance_url(calling_domain,
|
||||
self.server.http_prefix,
|
||||
self.server.domain_full,
|
||||
self.server.onion_domain,
|
||||
self.server.i2p_domain) + \
|
||||
redirect
|
||||
if redirect.startswith('tag:'):
|
||||
# conversation redirect
|
||||
conv_separator = '?convthread='
|
||||
redirect = conv_separator + redirect
|
||||
redirect = \
|
||||
get_instance_url(calling_domain,
|
||||
self.server.http_prefix,
|
||||
self.server.domain_full,
|
||||
self.server.onion_domain,
|
||||
self.server.i2p_domain) + redirect
|
||||
print('WARN: redirect was not an absolute url, changed to ' +
|
||||
redirect)
|
||||
|
||||
|
|
1
tests.py
1
tests.py
|
@ -61,6 +61,7 @@ from flags import contains_pgp_public_key
|
|||
from flags import is_group_actor
|
||||
from flags import is_group_account
|
||||
from flags import is_right_to_left_text
|
||||
from utils import get_instance_url
|
||||
from utils import replace_strings
|
||||
from utils import valid_content_warning
|
||||
from utils import data_dir
|
||||
|
|
Loading…
Reference in New Issue