User Invitation/Poking a user to a topic is now live!

I think inviting existing user is a “gentler” way to ask specific people to participate in a thread:
in some cases I want user to check topic and perhaps make a post, but I don’t want to put him/her in the spotlight by @mention which can be seen by others :blush:

9 Likes

The mention works when I have a reason to post in the thread. There’s very little reason to post if all I want to do is tell someone the thread exists.

But the biggest reason not to mention is that I typically just want them to see the thread, it’s up to them if they want to be involved in it

11 Likes

Thanks @watchmanmonitor & @lidel, it’s clear to me now how poking and @ mentions can have a different use.

2 Likes

Yes that makes sense. Thanks @lidel and @watchmanmonitor

1 Like

Fixed :sunny:

12 Likes

I moved a post to a new topic: Inviting user to a topic/message sends out incorrect email

Fixed via

https://github.com/discourse/discourse/pull/3337

4 Likes

@techAPJ you are a god :raised_hands:

2 Likes

Is there anyway this could be extend to private topics (i.e. topics in categories not visible to all)? Most of the forum that I run isn’t in public categories which reduces the usefulness of this excellent feature :frowning:.

One little bug with this feature and SSO, is that the invite button will appear on private topics. But produce an invite box thats useless. It offers to invite people via email, which immediately fails because of SSO.

1 Like

I would like to know the answer to this too. Because I would rather users not be able to invite visitors into a restricted category topic.

1 Like

I am assuming nothing has changed as regards category access privileges. Only admins can invite and add people to non-public categories. (Just tested this - yes, regular users do not see the INVITE button on private categories they are in) So @purldator you can relax. :wink:

What @thomaspurchas has me thinking about is that I would love to be able to do is give some users (e.g. by TL) permission to invite others to specific topics in private categories even if they do not already have access to the group. This request comes up all the time in my community. E.g. we have a leadership team with their own private category that only they are allowed to access. Occasionally they start topics and want to pull someone else into the discussion who is not in the group just to that topic.

The INVITE feature would be ideal for this. They’d be informed upon inviting them that the invitee will only get access to the topic, not the whole category. That another user has access would probably also have to be indicated somewhere in the topic, perhaps at the top next to category/tags?

Topic level permissions do not exist in Discourse, what you describe is impossible.

If you invite someone to a restricted topic, you would be permanently adding them to the group that has access to that category.

3 Likes

Yup - I’m aware that this is the way it works now. What I was dreaming about was how great it would be to have topic-level permissions.

1 Like

I feel that allowing one off topic access to an individual in a secure category is quite weird and prone to a lot of problems, even if it did exist.

1 Like

I was under the impression that this was just a ping feature (assuming the use of usernames), and that is all it ever would be.

The idea of inviting people to a private topic has come up a few times. But @sam and @codinghorror have always been a bit unhappy with the idea, for a number of good reasons (check the thread for details).

@techapj we need a better way of handling this for tl2 users. Maybe just never show invite on any topic in a private category to a non staff member. Staff members can send invites that add people to the necessary group, but there is no way a non staff member should have that ability.

We did talk about having a “group owner” who has the right to add people to their group. I suppose this person could also invite users to a private topic if it was a group they owned.

3 Likes

Here’s the current logic for whether to show the invite button, for reference.

  def can_invite_to?(object, group_ids=nil)
    return false if ! authenticated?
    return false unless ( SiteSetting.enable_local_logins && (!SiteSetting.must_approve_users? || is_staff?) )
    return true if is_admin?
    return false if ! can_see?(object)

    return false if group_ids.present?

    if object.is_a?(Topic) && object.category
      if object.category.groups.any?
        return true if object.category.groups.all? { |g| can_edit_group?(g) }
      end
      return false if object.category.read_restricted
    end

    user.has_trust_level?(TrustLevel[2])
  end
1 Like

I was kinda hoping that there would be a ping feature that would let you notify users about a topic, assuming that they had permission to view it.

That’s what I thought this feature was, an @mention without the need to create a post, or munge a name into a sentence.

That is different than allowing users to open the door for visitors and unauthorized users the administrator doesn’t know into a restricted category.

I think that would be solved by keeping the ‘invite’ button active on topics in a restricted category but instead query the username being poked and see if they have access. If they do, the poke is successful. If not, it returns an error to the poker. Inviting visitors via email from the outside isn’t available in any measure.

1 Like

The error shouldn’t be fatal so that you can still invite groups of people simultaneously without have to make sure that everyone has permissions. (That may already be true with the rate limiting error)