From ae1d615803655b74feaba10b6615a715c345f487 Mon Sep 17 00:00:00 2001 From: bleakgrey Date: Wed, 16 May 2018 12:11:54 +0300 Subject: [PATCH] Fix wrong account opening in links --- src/Widgets/RichLabel.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Widgets/RichLabel.vala b/src/Widgets/RichLabel.vala index d0daff9..f7cfabf 100644 --- a/src/Widgets/RichLabel.vala +++ b/src/Widgets/RichLabel.vala @@ -40,8 +40,9 @@ public class Tootle.RichLabel : Gtk.Label { } if ("/@" in url){ - var profile = url.split("/@")[1]; - AccountView.open_from_name (profile); + var uri = new Soup.URI (url); + var username = url.split("/@")[1]; + AccountView.open_from_name ("@" + username + "@" + uri.get_host ()); return true; }