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) + \
|
self.server.i2p_domain) + \
|
||||||
redirect
|
redirect
|
||||||
print('WARN: redirect was not an absolute url, changed to ' +
|
print('WARN: redirect was not an absolute url, changed to ' +
|
||||||
redirect)
|
redirect + ' ' + calling_domain)
|
||||||
|
|
||||||
quot_redirect = _quoted_redirect(redirect)
|
quot_redirect = _quoted_redirect(redirect)
|
||||||
self.send_response(303)
|
self.send_response(303)
|
||||||
|
|
@ -77,12 +77,16 @@ def redirect_headers(self, redirect: str, cookie: str,
|
||||||
calling_domain: str,
|
calling_domain: str,
|
||||||
code: int) -> None:
|
code: int) -> None:
|
||||||
if '://' not in redirect:
|
if '://' not in redirect:
|
||||||
redirect = get_instance_url(calling_domain,
|
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.http_prefix,
|
||||||
self.server.domain_full,
|
self.server.domain_full,
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain) + \
|
self.server.i2p_domain) + redirect
|
||||||
redirect
|
|
||||||
print('WARN: redirect was not an absolute url, changed to ' +
|
print('WARN: redirect was not an absolute url, changed to ' +
|
||||||
redirect)
|
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_actor
|
||||||
from flags import is_group_account
|
from flags import is_group_account
|
||||||
from flags import is_right_to_left_text
|
from flags import is_right_to_left_text
|
||||||
|
from utils import get_instance_url
|
||||||
from utils import replace_strings
|
from utils import replace_strings
|
||||||
from utils import valid_content_warning
|
from utils import valid_content_warning
|
||||||
from utils import data_dir
|
from utils import data_dir
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue