Commit graph

267 commits

Author SHA1 Message Date
Pavel Djundik e5cded0ad6 Fix local theme folder 2017-11-12 21:11:08 +02:00
Pavel Djundik feb7d9d4bb Fix #1692 when kicker is server 2017-11-08 23:10:17 +02:00
Pavel Djundik 44acc5cb00 Teardown sockets in tests 2017-10-06 12:53:08 +03:00
Jérémie Astori 1e10cc66a6
Use thelounge instead of lounge when it comes to external packages 2017-09-29 00:03:01 -04: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
Alistair McKinlay 59d2f93f61
Allow themes from npm 2017-09-17 19:47:29 -04: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
Pavel Djundik 9e008a76b7 Merge pull request #1527 from dgw/kick-modes
Display correct kick modes
2017-09-14 10:46:35 +03: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
Élie Michel f26c2dad0f
Take an optional argument in /part
Fix #1430
2017-09-13 20:24:45 -04:00
Pavel Djundik 099fb058c6 Merge pull request #1478 from eliemichel/pr-proper-ldap--rebased
Implement a proper LDAP authentication process
2017-09-04 09:02:58 +03:00
Elie Michel 435e14669b Change string formatting style 2017-09-03 23:00:25 +02:00
Elie Michel 00e54e49ac Add tests for LDAP auth plugin 2017-09-03 23:00:24 +02:00
Elie Michel 12ba10f688 Reorganize auth plugins 2017-09-03 23:00:23 +02:00
Élie Michel cfa6db10c7 Make new LDAP options backward compatible
Also draft some kind of plugin system for auth, although it essentially consists in writing a function
and there is no mechanism to automatically fallback from one auth to another
2017-09-03 23:00:23 +02:00
Jérémie Astori 220af0e180 Merge pull request #1449 from dgw/cycle-command
Add /cycle command (a.k.a. /rejoin)
2017-08-31 23:45:54 -04:00
dgw bed6053cec Add /cycle command (a.k.a. /rejoin)
Closes #1436
2017-08-31 06:43:32 -05:00
Pavel Djundik 495d8c3e04 Merge pull request #1448 from thelounge/xpaw/quit-promo
Set default quit default message
2017-08-26 20:34:32 +03:00
Jérémie Astori 9c5071ec98
Improve output of WebPush error
Without this, the error displayed contains a lot of superfluous information, repeated.
2017-08-26 11:47:35 -04:00
Pavel Djundik 4a3026e11b Set default quit default message 2017-08-24 21:07:47 +03: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
Pavel Djundik df698ab3ea Correctly send /list parameters 2017-07-28 13:53:41 +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