discourse/plugins/chat/assets/javascripts/discourse/controllers/chat-new-message.js
David Battersby a460dbcb37
FEATURE: Create a link to start a new chat (#25722)
This feature adds the functionality to start a new chat directly from the URL using query params.

The format is: /chat/new-message?recipients=buford,jona

The initial version of this feature allows for the following:

- Open an existing direct message channel with a single user
- Create a new direct message channel with a single user (and auto redirect)
- Create or open a channel with multiple users (and auto redirect)
- Redirects to chat home if the recipients param is missing
2024-02-20 18:08:57 +08:00

5 lines
146 B
JavaScript
Vendored

import Controller from "@ember/controller";
export default class ChatNewMessageController extends Controller {
queryParams = ["recipients"];
}