Allow-pm-to-staff

AI-generated summary

The plugin discourse-allow-pm-to-staff allows users who normally cannot send private messages to PM specific staff groups. pfaffman provides the initial overview, including configuration options such as allow_pm_allowed_pm_groups (defaulting to “staff”) and repository links.

Early discussion focused on resolving bugs. rahim123 reported issues with group pages failing to load, which pfaffman and Kushalghosh9899 confirmed were fixed in subsequent commits. Configuration support for multiple groups was clarified by RGJ and pfaffman, who specified that groups must be separated by a pipe | without spaces, a setting type that RGJ suggested adding to improve usability.

A naming discrepancy between the plugin name and directory was noted by rahim123, which pfaffman agreed to fix. Usage questions from Andrew_Rowe were addressed by nathank, who clarified the plugin applies only to logged-in users, not anonymous visitors.

Significant compatibility issues arose with Discourse version 2026.7.0+. Roi and pmcpa reported errors preventing PMs from sending, linked to a private_message_context argument mismatch in the plugin’s code. pfaffman acknowledged the breakage and noted a lack of funding for maintenance. However, pmcpa provided support, leading pfaffman to update the plugin, fix the core compatibility issue, and update tests. pmcpa and Roi confirmed that the updated plugin works correctly.

:information_source: Summary Allow all users to PM Staff
:hammer_and_wrench: Repository Link https://github.com/pfaffman/discourse-allow-pm-to-staff
:open_book: Install Guide How to install plugins in Discourse

Features

Allow users to send a PM to staff even if they would not otherwise be able to send a PM.

Configuration

  • allow_pm_to_staff_enabled–Enables the plugin (default true)
  • allow_pm_allowed_pm_groups–Set groups who can receive PMs from all users (default “staff”). Separate multiple groups with a | and no spaces.

CHANGELOG

  • Add ability to choose receiving groups other than staff.
  • 2023-04-07 resolved a problem that caused group pages not to load

TODO

  • nothing right now
16 Likes

Sure. Give it a try. The default settings allow pm to staff for all users, given that pms are allowed.

3 Likes

If I just need to allow PM from all users to the staff then the above issue wouldn’t affect me right?

1 Like

I think I fixed that problem

3 Likes

Yes, the problem is fixed now after the recent commit changes

2 Likes

Seems to be working fine. Thanks Jay for the fixes!

1 Like

Hello! First of all, I wanted to thank you for such a wonderful plugin :raised_hands:
Yesterday I installed this plugin on my forum, but I still couldn’t set up more than one group. When adding group names to the line, I tried using : ; , with and without a space, I even tried not to insert characters between the names (leaving only spaces), nothing helped - the line only supports one group. Tell me what am I doing wrong?:pray:
For example I want to achieve the following:

1 Like

You need to separate with | if remember correctly.

4 Likes

Thanks, Richard. | is the separator. Do not include spaces.

Sorry it’s hard to tell.

It would be nice if I’d included text for allowed_pm_allowed_pm_groups. I’ll do that next time I update anything in the plugin.

I did update the OP with a hint. Maybe that will help.

1 Like

Just add type: group_list to the setting?

3 Likes

LOL. Yeah. That just might do it. Thanks very much.

It was long ago that I wrote this. It was at the edge of my ability and I wasn’t very good at finding out what types were available what magic type: group_list would do.

This definitely needs some cleaning up, but it’s serviing the needs of the person I wrote it for, so I keep not touching it.

I’ll add this to my list, but I’ve got a bunch of other non-paying work that’s in line ahead of this one.

3 Likes

Hello! Oh yes, it worked :confetti_ball: Deeply grateful for the quick tip :pray:

3 Likes

It’s not a big deal, but I’m still seeing this message during upgrades:

Running post deploy migrations
$ bundle exec rake multisite:migrate
Plugin name is 'discourse-allow-pm-to-staff', but plugin directory is named 'allow-pms-to-staff'

I even tried manually renaming the plugin directory in the container, but it eventually gets reverted.

1 Like

I’ll try to get that fixed next week

2 Likes

Are you using https://github.com/pfaffman/discourse-allow-pm-to-staff as the repo?

Yep.
10 chars…

I’ve installed the plugin. I have checked allow pm to staff.

I created a group and set the allowed to message to everyone

I made a user a member of this group

I’ve tested by logging out then attempting to send the user a message from the user and group pages but cannot figure out how.

Have I misunderstood how this plugin works or maybe missed something?

Yeah, it is still for logged in users.

The plugin enables logged in users who wouldn’t normally be allowed to PM people to PM people in the @staff group. Unfortunatey it doesn’t do anything for anon (i.e. those who aren’t logged in).

This is why I used this little hack:

I’ve used that for years without issue (except the odd bit of spam).

1 Like

ok, sorry I guess I misunderstood

Sorry! Me too. I commented on your other topic.