Link for new DM / personal chat message with pre-filled information

Continuing the discussion from Create a link to start a new personal message with pre-filled information:

I’d love to be able to have a URL that I could give to people, or easily put into a theme component, where if they clicked it, it would start a personal chat with that person or it would continue an already ongoing personal chat.

Is this something that currently exists?

If not, would others want this as well?

7 Likes

Yes, this would also be useful for the community I’m administrating!

As context:

  • When setting up our Discourse instance, we decided to disable DMs in favor of the newer Chat function. We thought it would be confusing for our community members to have both.
  • Our Discourse has a category for support. I just replied to a topic where I used a DM link to my own profile (following the docs link above posted by @jimkleiber) to ask a member to share potentially private info with me, to continue helping him privately. But of course, we disabled DMs, so that didn’t work.

Having a simple link that opens a chat with a certain username would be helpful. Other pre-filled information isn’t that important for us.

7 Likes

Any update on this?
This would be really helpful for me!

3 Likes

Yes, I’m also interested in this, I raised the question somewhere about following a link in a chat (not PM), but I don’t remember where I wrote :thinking:

2 Likes

And I would need such link too, for support style invites. It would be much easier than send ordinary invite and give driving instructions to open an 1:1 chat, or for me need to create somekind reminder to open a chat when/if that person logs in.

5 Likes

I have an application and I want to enable users to chat with each other. This feature enables me to integrate chat seamlessly.

2 Likes

I’m also very interested in this, is there any news on adding it?

3 Likes

I’m happy to share that we’ve recently implemented the first version of this functionality, which will let you create a link to start a new chat with one or more users. You can try this in your community with the following URL…

https://[COMMUNITY]/chat/new-message?recipients=[USER1, USER2, ETC.]

…where you’ll replace:

  • [COMMUNITY] with your community URL (e.g., meta.discourse.org)
  • [USER1, USER2, ETC.] with the username(s) of the member you want to chat with. If creating a link to start a chat with multiple members, separate with commas.

For now, this only works for direct messages to one or more individuals.

As you give this a go, please let us know if there are more improvements we could make here to better support your community!

9 Likes

Just to add a note, for now this only works to open a chat window in full page mode instead of drawer mode.

Working great here on Meta for me :+1:

6 Likes

This feature is amazing and just what I was looking for.

The one thing missing that would be very helpful is if there were a way to start a Group DM the same way.

Alternately: if there were a way to change a DM with multiple people to a Group DM that would be great. The main difference between the two being the ability to add a name to a DM with multiple people.

2 Likes

Hi @lindsey - First off, thanks for building this. It is hugely helpful.

I’m running into an issue where each chat that is started this way is treated as unique even when it has the same people in it. For example if I start this chat:

https://mysite.com/chat/new-message?recipients=USER1,USER2,USER3

and then have a conversation, the next time I hit the same URL it creates a new group chat without any of the prior messages.

I’m generating these links dynamically and when I write out the URL I don’t have any way of knowing if the conversation is net new or the same recipients have already chatted before.

This probably isnt an easy problem to solve but it would be great if a DM already exists with the same recipient list it could just go there instead of spinning up an entirely new, blank DM.

2 Likes

FYI Chatbot has implemented the prefilled info as a kick off message, feel free to borrow the technique (but requires a plugin as adds a controller to the API)

But a native implementation would be welcome.

2 Likes

Thanks. Will check it out.

Once thing I’ve noticed is that if you hit the URL with a single person in it, it works perfectly / as expected with jumping to an existing conversation:

https://mysite.com/chat/new-message?recipients=USER1

but as soon as you add a 2nd person, it is unable to get back to the existing conversation:
https://mysite.com/chat/new-message?recipients=USER1,USER2

if it can do it correctly with 1 person in the conversation I’d like to believe there is a path to eventually make it work with multiple people.

1 Like

Can you share a little more about your use case? I understand that you’d like to link to the existing group chat when it exists, but the why will help me put that into context and learn how this would be helpful to your community.

1 Like

Hi Lindsey,

The “WHY” is the same as it is for spinning new chats for a group of users. We have people doing things off to the side (including outside of discourse + leveraging SSO) and want to spin up chats for them dynamically. It works perfectly the first time you do it.

But the 2nd time you do it, it creates a new DM conversation instead of bringing up the existing one which:

  • Makes the feature less useful because you can’t see the history
  • Clogs up your DMs with duplicate rows

As an example:

It should work the same way in both cases.

Screenshot 2024-05-06 at 10.36.13 AM

2 Likes

Is there ever a time when you’d want to open a new group chat instead of opening an existing group chat?

1 Like

With the exact same set of people? No… don’t think so.

1 Like

Thanks for all the feedback you’ve shared here — we’ll work on updating how these links work to open existing group chats (when available) instead of creating new ones.

I don’t have an ETA for when this might be ready, but we’ll share updates as we can.

2 Likes

Thanks for listening Lindsey. And no worries on timing as I’m sure you guys are doing a million things.

Discourse chat is an awesome product.

2 Likes