Commit graph

617 commits

Author SHA1 Message Date
Reto Brunner 0d209fce09 Clear obsolete mentions upon channel part
Currently, the mentions only track the chanID and MsgID.
However, when we part a channel the chanID becomes orphaned.

Considering that mentions from a parted channel probably aren't
that relevant, let's automatically clear them when we part.
Should the user really want to look at them again, they can re-join
the channel and get the scroll back that way.
2021-12-29 16:46:16 +01:00
John Sullivan cd7916b6d9
Merge pull request #4427 from thelounge/bookworm/mode
handle RPL_UMODEIS
2021-12-06 13:38:29 -08:00
Reto Brunner 1953e03253 Add RPL_UMODEIS msg handler 2021-12-06 07:24:21 +01:00
Maxime Poulin 2c2dd1c76f Switch busboy implementation to @fastify/busboy
I've been notified the current implementation is abandonned and has been forked by fastify to fix bugs, including some crashes and hangs:
See:
* https://github.com/mscdex/busboy/issues/250
* https://github.com/mscdex/dicer/pull/22
* https://github.com/mscdex/dicer/pull/25
2021-12-04 19:49:21 -05:00
Max Leiter 304d207820
Merge pull request #4361 from supertassu/kickban 2021-12-01 18:25:09 -08:00
Reto Brunner dc3a387120 vapid: keep the file secret
Contains a secret key, so we probably should keep it, well, secret.
Warn if the file is world readable.
2021-11-30 19:08:29 +01:00
Taavi Väänänen 324fb9023e
Add /kickban
This commit adds a new command, /kickban, that is a combination of /kick
and /ban: it kicks the specific user from the channel and then sets the
+b mode to ban the user from the channel.
2021-11-30 12:07:11 +02:00
sfan5 5f7ec9e8da
Don't download image contents during prefetch if not needed (#4363) 2021-11-22 16:59:33 -08:00
Max Leiter 40a5ee70b6
Disable /search and hide help item if searching is disabled 2021-11-17 20:23:51 -08:00
Max Leiter 3cec329e3b
Merge branch 'master' into fix-search-query 2021-11-15 12:42:56 -08:00
Max Leiter 59280cfdfd
Merge pull request #4329 from brunnre8/plugins
Add more plugin functionality
2021-11-04 14:12:02 -07:00
itsjohncs 044cd2403b Small cleanup of messageStorage/sqlite.
* Extend test coverage to the `search` function.
* Test sort order of messages from `getMessages` and `search`
* Move reversal of `search` results from Vue to messageStorage.
* Remove unnecessary uses of `sqlite.serialize` in tests.
* Return promises from test functions where possible.
2021-10-28 00:48:11 -07:00
Reto Brunner 1e896a9672 plugins: prefix logger with the plugin name 2021-10-13 23:39:32 +02:00
Reto Brunner 02ccbc1f69 plugins: expose persistant data dir
Plugins need to be able to store persistant files, say settings or
databases or similar things.
Expose a standard location that gets created when the path is
accessed.
2021-10-12 23:24:06 +02:00
Reto Brunner bb4ab4f168 plugins: add Logger interface
Plugins need to be able to log messasages, say for errors.
2021-10-12 23:24:06 +02:00
Max Leiter beb5530c65
Revert "Support animated webp images" (#4287)
This reverts pull/4186.
2021-08-31 12:27:43 -07:00
Reto 8fcd079204
Properly track user modes for context menu (#4267)
* properly track user modes for context menu

The RPL_ISUPPORT response contains a PREFIX element, which not only tracks the
prefix chars ("@", "+" etc) but also their corresponding mode chars (+O, +v)
This commit changes the context menu to not rely on a hardcoded list but rather
user the one given in the prefix response by the server.

Co-authored-by: Max Leiter <maxwell.leiter@gmail.com>
2021-07-21 00:30:07 -07:00
Max Leiter 03d38812e3
Merge pull request #4275 from hellomouse/isupport-modes
Optimise modes based on ISUPPORT
2021-07-06 17:09:31 -07:00
JeDaYoshi d96704835a
Send all modes in case of no ISUPPORT 2021-07-06 15:48:01 +00:00
Max Leiter 75cf4445c4
Merge pull request #4277 from hellomouse/server-privmsg-fix
Fix nick-less messages from servers
2021-07-06 01:02:18 -07:00
JeDaYoshi bbda392c3d
Move clientCommands to client
This approach automatically imports the command names.
2021-07-04 02:15:33 +00:00
JeDaYoshi 69c37a535b
Only add /search when there's a message provider 2021-07-04 00:31:43 +00:00
JeDaYoshi e0e12c1960
Fix tests for mode shorthand commands 2021-07-03 21:20:28 +00:00
JeDaYoshi 16177eb9f4
Move server nick code to handleMessage 2021-07-03 21:06:16 +00:00
JeDaYoshi 6439afd5c6
Fix nick-less PRIVMSGs from servers 2021-07-03 15:27:08 +00:00
JeDaYoshi 4dacaa46f3
Optimise modes based on ISUPPORT
This will see the maximum allowed of modes that are allowed at once as sent in RPL_ISUPPORT
and will send multiple batches while using /op, /voice, etc.

This also fixes a minor issue where it would try sending an empty voice if it had an extra space on arguments
(such as using '/voice  ')
2021-07-03 03:50:22 +00:00
JeDaYoshi 426841e6b7
Add /umode support 2021-07-03 02:28:21 +00:00
Bradley Shaw a2d23810bf
Differentiate WALLOPS from NOTICE 2021-06-22 11:50:22 +01:00
Bradley Shaw 38c0c343c3
Send server->channel notices to the relevant channel 2021-06-19 19:49:04 +01:00
Max Leiter 58217cffb1
Merge pull request #4219 from TheDecryptor/jpegxl_support
Add support for JPEG XL image previews
2021-05-25 21:36:37 -07:00
Max Leiter fc6c916e7c
Merge pull request #4213 from Nachtalb/na/search-command
Add new "/search query" command to open the search window
2021-05-25 21:31:17 -07:00
Alex Jones dbf6ff064b Add support for JPEG XL mimetype 2021-05-08 18:10:45 +10:00
Nachtalb 24a738d521
Add new command to open the search window 2021-05-06 03:22:09 +02:00
Nachtalb 0bfcd955e3
Improve inline audio file support
Tested on latest Chromium / Firefox. In case of .m4a files they want audio/x-m4a and not audio/m4a, in case of .flac files they want audio/flac and not audio/x-flac. The module we useed to detect the types however detects them only as audio/x-m4a and audio/x-flac as they are not offical IANA supported mime types (not in IANA spec == "x-" prefix): https://www.iana.org/assignments/media-types/media-types.xhtml Though flac is not in the IANA spec many programs such as the file command (https://man7.org/linux/man-pages/man1/file.1.html) and Chromium (flac) / Firefox (x-flac and flac) support audio/flac only or both.
2021-05-06 02:02:23 +02:00
Max Leiter 26a38b12ab
Merge pull request #4197 from Nachtalb/richrd/message-search
Message Search: Re-Rebase + Fixes / Adjustments
2021-05-03 16:18:15 -07:00
Nachtalb e010fe47cc
Respect metadata removal switch 2021-04-13 20:45:16 +02:00
Nachtalb 89390b3fc5
Ensure proper error handling when processing of file fails 2021-04-13 20:41:30 +02:00
Nachtalb c2c66031c0
Auto rotate images based on exif orientation
This makes sure that the orientation of the images work in all viewrs.
2021-04-13 18:24:33 +02:00
Nachtalb 3a6ac4e5ec
Support animated webp images
We need to remove the metadata without breaking the animation.
For that we use sharp which incooperates libvips (binaries for most common distros included).

This also decreases client side upload complexity as we remove the metadata on the serverside.

Sharp: https://sharp.pixelplumbing.com/
libvips: https://libvips.github.io/libvips/
2021-04-13 18:24:32 +02:00
Nachtalb d6a23061fc
Remove searchNicks for the time being
We should not have search implementation without a specced filter /
facet setup.
2021-04-12 23:23:04 +02:00
Mary Strodl 283ef445e5
Merge remote-tracking branch 'origin/master' into richrd/message-search 2021-04-12 22:00:49 +02:00
Nachtalb 3a42b5385e
Support inline flac audio 2021-04-11 15:43:42 +02:00
Nachtalb 14d76f8023
Add proper filename to the content-disposition header
By default we take the slug given in the request, if this is not set we try to give a filename from known types.
If we still have no filename we fallback to the previous method of setting no filename.

If the filename is non ascii we will only create the encoded "filename*" and not the ascii only "filename". This is to prevent other applications to save a file like "?????.png" if the filename contains non ascii chars.

For the browsers nothing will really change comapred to the behaviour before this change as good fallbacks if no content-disposition filename is set. But that is not the case for all application, thus it makes sense to include the proper way to set the filename.
2021-04-11 15:41:21 +02:00
Reto Brunner 7c17662fea Add prefetchMaxSearchSize to override limit for link previews
YouTube puts the opengraph tags needed for the preview after ~300KB in the body
instead of the beginning of the <head> tag.
Instead of hardcoding the value, allow the server admin to set the policy as
they prefer.
2021-02-27 00:10:53 +01:00
Nachtalb 877e4acf7d
Add network specific leave message 2020-12-18 10:53:37 +01:00
Yorick Bosman 651a7ac2e9 Add extended join information to join message. 2020-11-19 00:25:28 +01:00
Pavel Djundik a9fb563c01 Update mini-css-extract-plugin 2020-10-11 11:06:52 +03:00
Pavel Djundik 3fde2aa7b9 Always use multi-prefix modes
Fixes #323
2020-09-01 11:45:08 +03:00
Pavel Djundik ac842108f3
Merge pull request #4047 from thelounge/xpaw/avif
Detect `image/avif` as an image
2020-08-24 11:54:14 +03:00
Pavel Djundik df115333ba
Merge pull request #4041 from thelounge/mcinkay/2333/version-compatibility
Add version support for packages.
2020-08-23 20:46:44 +03:00