Fix links to user profiles from notifications page on Pleroma

Still fails for users on the same server -- needs to not include server part
This commit is contained in:
Jason McBrayer 2019-01-24 08:38:47 -05:00
parent 9150ba7629
commit 0bca674f88

View File

@ -63,7 +63,11 @@ def localuser(value):
try: try:
parsed = parse.urlparse(value) parsed = parse.urlparse(value)
instance = parsed[1] instance = parsed[1]
user = parsed[2][2:] set_trace()
if parsed[2].startswith('@'):
user = parsed[2][2:]
else:
user = parsed[2].split('/')[-1]
local = reverse('user', args=[user+'@'+instance]) local = reverse('user', args=[user+'@'+instance])
except: except:
local = value local = value