From 36893c6d7cc7fc673915d7a3c3f00aaa965e9b45 Mon Sep 17 00:00:00 2001 From: Daniel Stancu Date: Sun, 18 Dec 2016 01:59:49 +0200 Subject: [PATCH] Do not prefetch URLs unless they are messages or /me actions ACTION & MESSAGE type messages should be prefetched by default --- src/plugins/irc-events/message.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js index 1107594a..f83f1b4a 100644 --- a/src/plugins/irc-events/message.js +++ b/src/plugins/irc-events/message.js @@ -91,6 +91,9 @@ module.exports = function(irc, network) { }); chan.pushMessage(client, msg, !self); - LinkPrefetch(client, chan, msg); + // No prefetch URLs unless are simple MESSAGE or ACTION types + if ([Msg.Type.MESSAGE, Msg.Type.ACTION].indexOf(data.type) !== -1) { + LinkPrefetch(client, chan, msg); + } } };