Commit graph

202 commits

Author SHA1 Message Date
Pavel Djundik feb7d9d4bb Fix #1692 when kicker is server 2017-11-08 23:10:17 +02:00
Pavel Djundik 7cfd8d90c1 Merge pull request #1554 from thelounge/astorije/rm-event-stream
Remove event-stream dependency in favor of plain Buffers
2017-09-26 11:00:35 +03:00
Pavel Djundik 08edc434ca Merge pull request #1567 from dgw/preview-length-abort
Abort image prefetch if Content-Length exceeds limit
2017-09-25 23:11:20 +03:00
dgw 09cd9ce33a Abort img prefetch if Content-Length exceeds limit
If the Content-Length header is present in the response when an image
is prefetched, The Lounge can avoid wasting bandwidth (both for itself
and for the image's host) if the value of the header exceeds the
prefetch size limit by aborting the request immediately.
2017-09-25 05:31:21 -05:00
Jérémie Astori 75b927b4a3
Remove event-stream dependency in favor of plain Buffers 2017-09-23 04:08:17 -04:00
Pavel Djundik 6cfe60e4d9 Group push notifications per target 2017-09-19 12:01:50 +03:00
Jérémie Astori 90cb79ac91 Merge pull request #845 from MaxLeiter/MaxLeiter/away-notify
Use away-notify to show updates on users away state
2017-09-17 14:45:27 -04:00
Max Leiter 163cfaba3c Use away-notify to show user away status change 2017-09-17 11:16:48 -07:00
dgw e4c6d78762 Display correct kick modes
Defining both the kicker and the target before any code touches the
channel user list ensures that everything is passed to the template.
2017-09-14 02:39:00 -05:00
Pavel Djundik 0ac3ba28e1 Web Push Notifications 2017-08-22 10:54:18 +03:00
Jérémie Astori dff94cc6fd Merge pull request #1406 from thelounge/xpaw/storage-dereferencing
Correctly dereference stored images when leaving channels
2017-08-13 12:17:02 -04:00
Pavel Djundik 66ea26f4bd Resolve relative URIs in link previewer
Also adds support for image_src links
2017-08-13 13:06:01 +03:00
Pavel Djundik 6f32e7ae75 Correctly dereference stored images when leaving channels
Fixes #1404
2017-08-11 15:02:58 +03:00
Jérémie Astori 157289258a
Keep track of preview visibility on the server so it persists at page reload 2017-07-26 18:16:50 -04:00
Pavel Djundik ed9bfcf2fa Merge pull request #1194 from thelounge/xpaw/lazy-user-list
Lazily load user list in channels on init, keep autocompletion sort on server
2017-07-21 17:25:23 +03:00
Pavel Djundik 7d981d60d8 Recycle existing User objects in names event
This is required to keep lastMessage correct. This will also be useful for the away tracking PR.
2017-07-21 11:05:37 +03:00
Pavel Djundik 48d367e379 Use findUser 2017-07-21 11:05:37 +03:00
Pavel Djundik 7af573fd96 Handle auto completion order on the server
Fixes #289.
2017-07-21 11:05:21 +03:00
Jérémie Astori 900d41bf47
Re-use .previews to order incoming previews instead of extra links 2017-07-21 01:51:51 -04:00
Jérémie Astori a13c08a45b
Enforce correct order for previews on server-side prefectch rather than at client parsing
This has the benefit of not adding `.preview` divs everywhere, anytime we use `parse()`, and also to un-tie the position of the preview blocks from the result of the helper. This means that templates that call `parse` and have some extra markup after that are not constrained anymore.

This is effectively an alternative, better way to fix https://github.com/thelounge/lounge/issues/1343, but the initial fix that was put in place (https://github.com/thelounge/lounge/pull/1347) is still relevant, for example to make sure a preview stays hidden (and does not add extra margin/padding/etc.) if the link does not prefetch.
2017-07-21 01:06:42 -04:00
Jérémie Astori 03d6f284fb Merge pull request #1330 from MaxLeiter/MaxLeiter/TIME
Add SOURCE CTCP Command
2017-07-19 02:00:50 -04:00
Pavel Djundik f35a2809a7 Store preview images on disk for privacy, security and caching 2017-07-18 11:37:16 +03:00
Max Leiter 58cf481d86 Add SOURCE CTCP Command 2017-07-17 11:09:20 -07:00
Jérémie Astori 64ebe0f437
Support multiple previews per message
- Load up to 5 previews per message (to avoid abuse)
- Do not load multiple times the same URL
- Prepare preview containers per message instead of appending (to maintain correct order)
- Store an array of previews instead of a single preview in `Msg` objects
- Consolidate preview rendering for new messages and upon refresh/load history (when rendering entire channels)
- Update `parse` tests to reflect previous point
- Add test for multiple URLs
- Switch preview tests from `assert` API to `expect` API
2017-07-08 04:34:12 -04:00
Pavel Djundik 14b2ad7938 Refactor link previews 2017-07-03 00:41:18 +03:00
Jérémie Astori ad10777684 Merge pull request #1274 from thelounge/xpaw/increase-prefetch-limit
Increase max downloaded bytes for link preview
2017-06-26 02:44:46 -04:00
Pavel Djundik e967759802 Increase max downloaded bytes for link preview
twitter.com sends opengraph meta tags within ~20kb of data for individual tweets
2017-06-26 09:34:56 +03:00
Pavel Djundik 77667e7a3f Do not display preview if there is nothing to preview 2017-06-26 09:27:51 +03:00
Jérémie Astori 5abc4c8c2a Merge pull request #1256 from thelounge/xPaw/og-title
Check og:title before title tag
2017-06-26 01:48:07 -04:00
Jérémie Astori 147a36adde Merge pull request #1254 from thelounge/xpaw/thumb-is-img
Make sure thumbnail is a valid image
2017-06-26 01:46:20 -04:00
Jérémie Astori 0239fdd2fb Merge pull request #1255 from thelounge/xPaw/og-description
Check og:description before description
2017-06-26 01:44:54 -04:00
Pavel Djundik ddc076e894 Check status code in link prefetcher
Fixes #1258.
2017-06-23 20:49:45 +03:00
Pavel Djundik 015a9fb6ef Check og:title before title tag 2017-06-22 22:41:05 +03:00
Pavel Djundik 23c7f7296c Check og:description before description 2017-06-22 22:34:17 +03:00
Pavel Djundik 3fd2849a37 Make sure thumbnail is a valid image
Fixes #1239.
Fixes #1180.
2017-06-22 22:32:13 +03:00
Niko Bews 57fd0562a2 Handle images with unknown size in prefetch 2017-06-21 14:40:51 +03:00
Pavel Djundik f6dd616d5e Update to eslint 4 and enforce extra rules 2017-06-19 09:58:29 +03:00
Pavel Djundik acf5dd5351 Do not store unnecessary information in user objects 2017-06-01 21:54:46 +03:00
Alistair McKinlay b03d01b6eb Add ban/unban command
Fixes #1073
2017-04-26 08:54:25 +01:00
Alistair McKinlay 1e504f4383 Add support for banlist messages 2017-04-22 13:51:28 +01:00
Jérémie Astori 4de632ba3c Merge pull request #1018 from swordbeta/sort_channel_list
Improve channels list.
2017-04-20 01:40:14 -04:00
Michael van Tricht 764ac831d4 Improve channels list.
- Set fixed width to channel and users column.
- Sort by number of users in channel.
- Executing /list multiple times wont show multiple tables.
- Channel list is not stickied to the bottom.
- Limit channels to 500. Scrolling through 1k is very slow on my system.
2017-04-19 12:02:15 +02:00
Daniel Oaks 5c336d3789 Add slug with command to unhandled messages 2017-04-16 12:31:32 +03:00
Pavel Djundik c0e364e1c2 Store channel keys 2017-04-01 15:28:38 -04:00
Pavel Djundik 4a68b78fd5 Implement away message restoration on reconnections and auto away 2017-03-29 00:27:58 -04:00
Pavel Djundik c409328ddf Fix variable shuffling around ident handler
Fixes #965
2017-03-17 22:24:40 +02:00
Pavel Djundik 9997aafec7 Rewrite identd server, combine with oidentd 2017-03-12 12:02:22 +02:00
Daniel Stancu 36893c6d7c Do not prefetch URLs unless they are messages or /me actions
ACTION & MESSAGE type messages should be prefetched by default
2017-01-23 01:42:54 -05:00
Jérémie Astori df4b14d546 Merge pull request #783 from thelounge/xpaw/irc-raw-log
Option to log raw IRC traffic
2017-01-04 01:56:19 -05:00
Jérémie Astori 7ae11babcb Add human-readable idle time in whois info 2016-12-22 00:21:16 -05:00