Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding users with mentions doesn't work inside of threads #696

Closed
b90g opened this issue May 11, 2020 · 14 comments · May be fixed by RocketChat/Rocket.Chat#23845
Closed

Adding users with mentions doesn't work inside of threads #696

b90g opened this issue May 11, 2020 · 14 comments · May be fixed by RocketChat/Rocket.Chat#23845
Assignees

Comments

@b90g
Copy link

b90g commented May 11, 2020

Description:

When adding users to public channels via @user-mention it only works in the main Chat, not in a thread.

Steps to reproduce:

  1. in a Public room
  2. where user isnt in yet
  3. in a Thread
  4. mention someone @user

Expected behavior:

  1. user would join the room.

Actual behavior:

  1. user does not join the room.

Server Setup Information:

  • Version of Rocket.Chat Server: 3.2.1
  • Operating System: lubuntu
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: ?
  • NodeJS Version: ?
  • MongoDB Version: ?

Client Setup Information

  • Desktop App or Browser Version: Firefox 76
  • Operating System: Qubes OS (Debian VM)
@EnCz
Copy link

EnCz commented May 11, 2020

Is this really the expected behavior ?
I'm generally not a fan of the whole mentions = invite idea.
Maybe I just want to mention someone so other people can easily click his username or just do it by habit.
IMHO are mentions and invites 2 seperate functions, but that's just me.

@b90g
Copy link
Author

b90g commented May 11, 2020

So you think the issue should be mentions add users to channels?....

Either way, please stream line this function so people don't assume falsely that when tagged in a thread, people are already in a room, because there is no user had joined the room-message.

@EnCz
Copy link

EnCz commented May 11, 2020

I'm absolutely for a streamlined version, how do discussions in public rooms work? Can you invite people by mention there?
In my opinion there need to be some Checkboxes in Admin-> Messages.

[ X ] Mentions in public channels trigger invite
[ X ] Mentions in public discussions trigger invite
[ ] Mentions in private groups trigger invite
[ ] Mentions in direct messages trigger invite

But that would be a feature request.

Back to your described issue, I can only find this in the official documenation:

Joining new channels and starting direct messages
There are three ways of joining a public channel; through search, invites, or mentions.

So yes, the expected behaviour would probably be that mentions in public threads trigger an invite. At least there is no exception stated in the documentation that this won't work in threads.

It's just all in all not not really consistent imo.

@ankar84
Copy link

ankar84 commented May 12, 2020

IMHO are mentions and invites 2 seperate functions, but that's just me.

Agree with you.
And maybe it could be servers side configurable settings (Does mention invites to public channel)

@ankar84
Copy link

ankar84 commented May 12, 2020

In my opinion there need to be some Checkboxes in Admin-> Messages.

Totally agree! That would be nice!

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@Fishbowler
Copy link

I quite like Slack's approach to this. Give the option to the user.

image

@geekgonecrazy
Copy link
Member

I think we have some issues open for this, and it seems like it should be very easy to implement this system message instead RocketChat/Rocket.Chat#2194 . But is off topic for this bug :)

@aditya-mitra
Copy link

@sampaiodiego Is this issue open to work on?

We can have this feature as pointed out in the earlier comment

image

I am thinking of 2 ways by which we can do this:

  1. In current codebase:
    A callback can be added in the Mentions.js file which will run afterSaveMessage and check if the mentioned user is present (subscribed) to the room or not. This function will send message as shown in the image and contain the 3 buttons. And a bot (ex. rocket.cat) can notify the user if let them know is chosen or add them to room if Invite Them is chosen.
    But, I am not clear how a user is added to the room when mentioned and how to add the ui buttons in the next message.

  2. In a Rocket.Chat App:
    A Rocket.Chat app can be created which can use the methods - getMembers, addMember and the uikit blocks to display the buttons for invite them and do nothing.
    But, I am not sure if we can do this without modifiying the message (we will have to suppress the mention if the user is not in the room) because our callback has to run after the message is saved.

Please point me out the direction where I should start working.
Thank you. 😃

@b90g
Copy link
Author

b90g commented Apr 30, 2021

Maybe related mentioning @all in a thread doesnt notify all users in a channel.
Should i open a new issue or is this configureable via settings and i just wasnt able to find it?

@sampaiodiego
Copy link
Member

@aditya-mitra I'd say doing it as a Rocket.Chat App is preferred, but you should be able to use UiKit without an app too.

I don't think you need to change the original message though, you just need to send an ephemeral message with those actions if the message had a mention to a non-member.

@yash-rajpal
Copy link
Member

yash-rajpal commented May 6, 2021

@sampaiodiego @aditya-mitra
Just tagging along :)

If a Rocket.Chat App is needed, I can collaborate with @aditya-mitra and help out. I have basic familiarity on how Rocket.Chat App works and how to make one, I have made a prototype app too, you can check on my GitHub here :)

Please let me know If I can help with it. Thanks :)

@aditya-mitra
Copy link

If a Rocket.Chat App is needed, I can collaborate with @aditya-mitra and help out.

Thank you @yash-rajpal 🎉

@sampaiodiego We shall start working on it from Saturday. 😄

@b90g
Copy link
Author

b90g commented Apr 26, 2024

RC now tells you if a person isnt in the channel you mentioned them in.

@b90g b90g closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants