aboutsummaryrefslogtreecommitdiff
path: root/lib/client.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of codeberg:emersion/gamjaRunxi Yu2024-07-251-8/+7
|\
| * lib/client: add support for AUTHENTICATE chunkingSimon Ser2024-06-301-8/+7
| | | | | | | | | | SASL responses need to be split into 400 byte chunks before being sent to the server.
* | Merge branch 'master' of https://git.sr.ht/~emersion/gamjaRunxi Yu2024-06-271-2/+7
|\|
| * Hide replies to our own internal WHO commandsSimon Ser2024-04-171-1/+6
| | | | | | | | References: https://todo.sr.ht/~emersion/gamja/88
| * lib/client: fix number of field check in RPL_WHOSPCRPLSimon Ser2024-04-171-1/+1
| | | | | | | | The first field is the client.
* | Revert "lib/client.js: hardcode username"Ferass El Hafidi2024-04-181-1/+1
| | | | | | | | This reverts commit fb16317f66b6861fe9a541823db99066813547df.
* | lib/client: 'fix' error reportingFerass El Hafidi2024-03-241-4/+0
| |
* | lib/client: add delay before AUTHENTICATE <base64> and CAP ENDFerass El Hafidi2024-03-241-2/+6
| | | | | | | | This hack fixes SASL login on InspIRCd.
* | lib/client: disable batch capFerass El Hafidi2024-03-221-1/+0
| | | | | | | | | | This fixes chat history on InspIRCd. XXX: Hacky 'solution'
* | lib/client.js: hardcode usernameFerass El Hafidi2024-03-221-1/+1
|/
* lib/client: print raw messages in debug modeSimon Ser2024-03-011-4/+7
| | | | | Browser consoles aren't super helpful in general and just show the command name, require extra clicks to see the params.
* lib/client: ensure server prefix is never nullSimon Ser2023-08-171-2/+4
| | | | | Fixes a null deref in handleChatMessage, because incoming message prefixes are populated with the server's if null.
* Migrate to async/awaitSimon Ser2023-04-191-39/+33
|
* lib/client: encode empty SASL response as "+"Simon Ser2023-03-211-1/+1
|
* Move msg.tags fallback to clientSimon Ser2022-11-301-0/+3
|
* lib/client: unify checks for chathistory endSimon Ser2022-11-301-1/+1
|
* Use ratified extended-monitor cap nameSimon Ser2022-11-061-0/+1
| | | | References: https://github.com/ircv3/ircv3-specifications/pull/508
* Add support for OAuth 2.0 authenticationSimon Ser2022-10-141-0/+7
|
* Drop support for soju.im/readSimon Ser2022-09-031-14/+3
| | | | It's been superseded by draft/read-marker.
* Fix draft/read-marker cap not negotiatedSimon Ser2022-09-031-0/+1
| | | | Fixes: 1428ec4d4991 ("Add support for draft/read-marker")
* Fetch read marker before backlog for user targetsSimon Ser2022-09-031-0/+5
|
* Add support for draft/read-markerSimon Ser2022-07-011-0/+28
| | | | References: https://github.com/ircv3/ircv3-specifications/pull/489
* Workaround the sad state of base64 web APIsSimon Ser2022-06-241-2/+3
| | | | | This is necessary to make usernames/passwords with UTF-8 in them work correctly.
* Add a settings dialogSimon Ser2022-06-081-1/+4
| | | | | | Add an option to hide chat events or always expand them. Closes: https://todo.sr.ht/~emersion/gamja/73
* Handle CHATHISTORY messages when reaching end of batchSimon Ser2022-04-221-2/+2
| | | | Closes: https://todo.sr.ht/~emersion/gamja/115
* Add support for soju.im/readSimon Ser2022-02-111-0/+1
|
* fix ping after reconnectДамјан Георгиевски2022-02-041-0/+2
| | | | | | | | | client.setPingInterval was only called once in app.connect(), but client.disconnect() disables it, and the ping timer is never again set, even though the client can reconnect. the change passes the ping time as a parameter to the client, and the client calls setPingInterval() after a successful WS open event.
* commands: add password param to /joindelthas2022-02-021-2/+6
|
* lib/irc: add CapRegistrySimon Ser2021-12-101-48/+14
|
* Implement exponential backoff for reconnectionsSimon Ser2021-12-071-3/+40
| | | | Closes: https://todo.sr.ht/~emersion/gamja/118
* Refactor ISUPPORT handlingSimon Ser2021-12-071-44/+20
| | | | | | Add a helper class to parse ISUPPORT tokens. Instead of having manual ISUPPORT handling all over the place, use pre-processed values.
* lib/client: use Error objects for error eventsSimon Ser2021-12-061-22/+16
|
* Handle FAIL ACCOUNT_REQUIREDSimon Ser2021-12-061-3/+17
|
* Read nickname from RPL_WELCOMESimon Ser2021-12-061-0/+1
| | | | References: https://github.com/ircdocs/modern-irc/pull/146
* Add Client.join, show join errors in popupSimon Ser2021-12-041-0/+26
|
* lib/client: add generic error handling to roundtrip()Simon Ser2021-12-041-40/+46
|
* lib/client: introduce IRCErrorSimon Ser2021-12-041-5/+19
|
* Disable debug logs in productionSimon Ser2021-12-011-2/+7
| | | | | | | | | | | console.debug logs cause some performance issues because the browser is forced to save the logged objects just in case the user opens the debugging tools. They can be force-enabled back by adding ?debug=1 to the URL. Only console.debug is disabled, console.log and other levels are a lot less verbose and still enabled by default.
* Add support for draft/account-registrationSimon Ser2021-11-301-0/+50
| | | | A new UI to register and verify accounts is added.
* lib/client: make authenticate() return a promiseSimon Ser2021-11-211-19/+32
| | | | This lets the caller handle the success/failure.
* lib/client: send BOUNCER BIND and CAP END immediatelySimon Ser2021-11-211-27/+24
| | | | Don't wait for auth to finish. This reduces the number of roundtrips.
* lib/client: catch handleMessage errorsSimon Ser2021-11-211-1/+9
|
* lib/client: always request sasl cap when availableSimon Ser2021-11-211-10/+9
| | | | This will allow us to issue post-registration SASL commands.
* lib/client: don't disconnect on SASL error if registeredSimon Ser2021-11-211-1/+3
| | | | | This will let users try multiple auth attempts when we'll implement post-registration auth.
* lib/client: remove one roundtrip during SASL authSimon Ser2021-11-211-26/+29
| | | | | Instead of waiting for the server's empty challenge, send two AUTHENTICATE commands in a row.
* lib/client: don't error out if SASL isn't available on RPL_WELCOMESimon Ser2021-11-191-1/+3
| | | | | Some servers (soju) might remove the sasl cap on connection registration.
* Store WHO list in RPL_ENDOFWHOSimon Ser2021-11-101-0/+7
| | | | | This allows the state-tracker to figure out whether a WHO query returned no result.
* Only allow one WHO command at a timeSimon Ser2021-11-101-22/+31
| | | | Closes: https://todo.sr.ht/~emersion/gamja/120
* Don't stop fetching backlog on errorSimon Ser2021-11-101-1/+2
| | | | | | | Some servers allow fetching history from some targets but not others. Don't completely stop fetching chat history on error. The root cause was a variable shadowing in Client.fetchBatch.
* Add support for draft/extended-monitorSimon Ser2021-11-091-0/+1
| | | | References: https://github.com/ircv3/ircv3-specifications/pull/466