diff --git a/nightwatch/web/css/main.css b/nightwatch/web/css/main.css index 0b6c74c..7cd98b2 100644 --- a/nightwatch/web/css/main.css +++ b/nightwatch/web/css/main.css @@ -104,7 +104,7 @@ input:hover { padding-bottom: 5px; } .message-content > img { - max-width: 300px; + max-width: 640px; } .timestamp { margin-left: auto; diff --git a/nightwatch/web/js/nightwatch.js b/nightwatch/web/js/nightwatch.js index 18edd11..9cdf563 100644 --- a/nightwatch/web/js/nightwatch.js +++ b/nightwatch/web/js/nightwatch.js @@ -86,7 +86,8 @@ const NOTIFICATION_SFX = new Audio("/audio/notification.mp3"); // Construct text/attachment let attachment = message.message, classlist = "message-content"; if (attachment.toLowerCase().match(/^https:\/\/[\w\d./-]+.(?:avifs?|a?png|jpe?g|jfif|webp|ico|gif|svg)(?:\?.+)?$/)) { - attachment = ``; + const url = `http${connection.protocol}://${address}/api/fwd/${btoa(attachment.slice(8))}`; + attachment = ``; classlist += " has-image"; } else {