From e3356bb3aafdbd6f8e720dec271a7215a94bf041 Mon Sep 17 00:00:00 2001
From: LAGonauta <lagonauta@gmail.com>
Date: Fri, 4 Dec 2020 07:40:27 -0300
Subject: [PATCH] Do not use GLib to open links in messages

Use ShellExecute
---
 .../ui/conversation_content_view/message_widget.vala   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/main/src/ui/conversation_content_view/message_widget.vala b/main/src/ui/conversation_content_view/message_widget.vala
index 44584709..aae3ef55 100644
--- a/main/src/ui/conversation_content_view/message_widget.vala
+++ b/main/src/ui/conversation_content_view/message_widget.vala
@@ -221,7 +221,15 @@ public class MessageItemWidget : SizeRequestBin {
 
     public static bool on_label_activate_link(string uri) {
         // Always handle xmpp URIs with Dino
-        if (!uri.has_prefix("xmpp:")) return false;
+        if (!uri.has_prefix("xmpp:")) {
+#if _WIN32
+            Dino.Util.launch_default_for_uri(uri);
+            return true;
+#else
+            return false;
+#endif
+        }
+
         File file = File.new_for_uri(uri);
         Dino.Application.get_default().open(new File[]{file}, "");
         return true;