- Mentions were doing a bunch of mutations; not just uses derived state
- no need for a separate `ClientMention`
- added `extractInputHistory` for shared logic
- tests made by claude
The spread operator will place the arguments, which can reach the call
stack limit if too many messages are being sent. This fix uses
`.concat()` to avoid the spread operator.
Fixes#5022
Dynamic imports won't work very well with modules and we don't
really need them, it's just there to save us an import statement.
Let's flip this to a static version.
socket-events aren't ever imported, if we don't do that however
webpack never actually sees any code that leads to it and skips
bundling it.
So for now, do an import that has the side effect of registering
all the events until we have a proper registration in place that's
a bit more sane to call
The sort event bundled networks and channels for no reason at all.
They share none of the actual logic, so combining them just makes
the typing poor but serves no benefit.
Currently, in `ChatInput.vue` we call `upload.abort()` which removes the event listeners, which are never added back. This effectively permanently disable uploads if the user navigates away to Settings or any other non-chat pages, and back.
Moves the binding to `mounted()` so that they're properly rebound when a chat window is in view, and also adds an `unmounted()` for clarity.
This should also fix an edge case if the page opens up on a non-chat page and there was never a ChatInput to unbind it, such as login page or add network pages.