[polari] chatView: Only preview http* URLs
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Only preview http* URLs
- Date: Wed, 18 Dec 2019 01:53:28 +0000 (UTC)
commit 9cd8e8f707d324c7dc81c15bee98d58aed33433e
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Dec 15 22:23:14 2019 +0100
chatView: Only preview http* URLs
We don't know how to preview those, not to mention that there's a fair
chance that a preview wouldn't be meaningful to begin with (for instance
irc:// or file://)
https://gitlab.gnome.org/GNOME/polari/merge_requests/139
src/chatView.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index c008ad3..0b37c79 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -1333,7 +1333,8 @@ var ChatView = GObject.registerClass({
this._insertWithTags(iter,
url.name, tags.concat(this._lookupTag('url'), tag));
- previews.push(new URLPreview({ uri: url.url, visible: true }));
+ if (GLib.uri_parse_scheme(url.url).startsWith('http'))
+ previews.push(new URLPreview({ uri: url.url, visible: true }));
pos = url.pos + url.name.length;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]