Commit Graph

208 Commits

Author SHA1 Message Date
delthas 7dd21177bc Add support for incoming REDACT
This does not include support for redacting messages, only reading
incoming REDACT messages.

See: https://github.com/ircv3/ircv3-specifications/pull/524
2025-02-07 00:26:02 +00:00
Calvin Lee 5146b0cad8 eslint: add lint enforcing camelCase
snake_case is needed in one place in the codebase to format URL arguments.
Co-authored-by: Calvin Lee <pounce@integraldoma.in>
Co-committed-by: Calvin Lee <pounce@integraldoma.in>
2025-01-27 16:29:58 +00:00
Simon Ser 2f1bf8a2fe lib/client: don't mutate input argument in fetchHistoryBetween() 2024-11-16 12:45:08 +01:00
Simon Ser 75eb175e24 eslint: enable object-shorthand 2024-11-16 12:28:17 +01:00
Simon Ser afa09cfc25 lib/client: fix typo
That one turned out to be surprisingly tricky to dig out.
2024-11-12 23:11:10 +01:00
Simon Ser 977752e0f2 lib/client: bind handleOnline to this
It's used as a callback to removeEventListener().
2024-11-12 23:10:38 +01:00
Simon Ser 75ec7cd212 lib/client: don't throttle reconnections if opened long ago
If a connection was opened a long time ago, and recently got broken,
try to reconnect immediately.
2024-11-12 23:10:30 +01:00
Simon Ser 24e6767cab client: reconnect immediately if network comes online during backoff 2024-11-12 23:10:22 +01:00
Simon Ser b67cd10c64 Remove usage of == and != 2024-10-14 00:56:36 +02:00
Simon Ser b9d12bc8cd lint: turn on @stylistic/js/semi 2024-09-29 11:49:17 +02:00
Simon Ser 78bfd16f25 Remove two remaining single quote strings 2024-09-29 11:45:13 +02:00
Simon Ser 07ae5f7167 Disallow var keyword 2024-09-28 22:07:39 +02:00
Simon Ser 97920ff7f6 Prefix unused variables with an underscore 2024-09-28 21:44:23 +02:00
Simon Ser 6693cc0c78 Remove unused variables 2024-09-28 21:43:23 +02:00
Simon Ser 26792ec386 components/buffer: add human-readable channel mode changes
References: https://todo.sr.ht/~emersion/gamja/162
2024-09-08 12:48:07 +02:00
Simon Ser 6be24e8ed9 lib/irc: unexport STD_MEMBERSHIPS and STD_CHANTYPES 2024-09-07 12:37:10 +02:00
Simon Ser 301f133272 lib/irc: move over STD_MEMBERSHIP_NAMES 2024-09-07 12:36:13 +02:00
Simon Ser 2c0f2a80e9 lib/irc: remove stray hardcoded constant 2024-08-13 00:29:00 +02:00
Simon Ser 6c324d44a1 lib/client: add support for AUTHENTICATE chunking
SASL responses need to be split into 400 byte chunks before being
sent to the server.
2024-06-30 23:44:14 +02:00
Simon Ser 269e034581 Hide replies to our own internal WHO commands
References: https://todo.sr.ht/~emersion/gamja/88
2024-04-17 23:45:44 +02:00
Simon Ser 1ea7c30744 lib/client: fix number of field check in RPL_WHOSPCRPL
The first field is the client.
2024-04-17 23:29:54 +02:00
Simon Ser 87e88cccca Add support for soju.im/filehost
For now, only handle paste events containing files.

Co-authored-by: Alex McGrath <amk@amk.ie>
2024-04-16 13:22:24 +02:00
Simon Ser 3584c1eb10 lib/irc: fix whitespace RegExp test in isURIPrefix 2024-03-13 15:41:04 +01:00
Simon Ser 2fe2ce6912 lib/irc: fix assignment to undefined variable in isURIPrefix 2024-03-07 23:04:40 +01:00
Simon Ser 57f7b1c011 lib/irc: fix whitespace split in isURIPrefix
We want to get the last index of whitespace, not the first one.
2024-03-07 11:40:37 +01:00
Simon Ser 5d3738bc40 lib/irc: ignore highlights in URLs 2024-03-02 12:36:30 +01:00
Simon Ser 429b4595e7 lib/client: print raw messages in debug mode
Browser consoles aren't super helpful in general and just show
the command name, require extra clicks to see the params.
2024-03-01 15:03:09 +01:00
Simon Ser b38777e92a lib/linkify: add geo URI scheme 2024-01-10 11:38:23 +01:00
Simon Ser 0640ff8712 Upgrade linkifyjs to v4 2024-01-10 11:33:20 +01:00
Simon Ser 8f29f0c35d lib/client: ensure server prefix is never null
Fixes a null deref in handleChatMessage, because incoming message
prefixes are populated with the server's if null.
2023-08-17 10:45:56 +02:00
Simon Ser 535bdb2f52 Migrate to async/await 2023-04-19 12:51:13 +02:00
Simon Ser 57f64e9cc2 lib/irc: add formatURL 2023-04-19 11:43:45 +02:00
Simon Ser fd63c169ed lib/client: encode empty SASL response as "+" 2023-03-21 17:57:09 +01:00
delthas 081f5743be Fix stripping hex color formatting
Hex colors can be set with the same formats as the regular colors:
<CODE>, <CODE><COLOR>, or <CODE><COLOR>,<COLOR>.

Previously we only supporteed <CODE><COLOR>.

This patch enables stripping colors for all valid color formats.

Co-authored-by: Simon Ser <contact@emersion.fr>
2022-12-02 16:03:14 +01:00
Simon Ser 4b306305bf Move msg.tags fallback to client 2022-11-30 11:30:46 +01:00
Simon Ser dc5e64aaac lib/client: unify checks for chathistory end 2022-11-30 10:17:50 +01:00
Simon Ser 2d27168529 Use ratified extended-monitor cap name
References: https://github.com/ircv3/ircv3-specifications/pull/508
2022-11-06 20:40:00 +01:00
Simon Ser e815295503 Add support for OAuth 2.0 authentication 2022-10-14 10:52:44 +02:00
Simon Ser a2d2a11d44 Drop support for soju.im/read
It's been superseded by draft/read-marker.
2022-09-03 14:41:53 +02:00
Simon Ser e6618c8a1f Fix draft/read-marker cap not negotiated
Fixes: 1428ec4d49 ("Add support for draft/read-marker")
2022-09-03 14:40:54 +02:00
Simon Ser 4780b9c709 Fetch read marker before backlog for user targets 2022-09-03 14:31:56 +02:00
Simon Ser e7b69cec9a Limit composer length
Often times IRC servers will truncate messages which are too big.
2022-08-28 19:16:41 +02:00
Simon Ser 7138e43710 Ignore RPL_CHANNEL_URL 2022-08-22 10:35:50 +02:00
Simon Ser 1428ec4d49 Add support for draft/read-marker
References: https://github.com/ircv3/ircv3-specifications/pull/489
2022-07-01 13:35:27 +02:00
Simon Ser 505a6fd5ab Workaround the sad state of base64 web APIs
This is necessary to make usernames/passwords with UTF-8 in them
work correctly.
2022-06-24 23:59:18 +02:00
Simon Ser baaf576d82 Add a settings dialog
Add an option to hide chat events or always expand them.

Closes: https://todo.sr.ht/~emersion/gamja/73
2022-06-08 16:57:16 +02:00
Simon Ser 6b04cb1417 Add support for bot mode
References: https://ircv3.net/specs/extensions/bot-mode
2022-06-08 15:04:27 +02:00
Simon Ser 4a981997f0 Handle CHATHISTORY messages when reaching end of batch
Closes: https://todo.sr.ht/~emersion/gamja/115
2022-04-22 11:25:41 +02:00
Simon Ser e37d5f363b lib/irc: fix bound check in isHighlight
Doesn't seem like this was causing any issues, but let's fix the
logic regardless.
2022-02-25 11:38:00 +01:00
Simon Ser 221b1b6356 lib/irc: remove unnecessary non-breaking-space case
Handled by the default case already.
2022-02-25 11:37:18 +01:00