Mingle is an icebreaker plugin for Discourse, inspired by the Donut slackbot and originally discussed here. [Hi @debryc!]
How it works
Specify a time period (e.g. 2 weeks), a group of users, and a customizable message.
Once per time period, weāll randomly pair up people in the group, and send them a friendly private message, inviting them to get to know each other a little better.
What to do
In order to set up a Mingle, follow these four steps:
Visit the Mingle settings panel at <yoursite.com>/admin/site_settings/category/all_results?filter=mingle. Select a group, setup a time period, and select a user to send the message. Mingle is disabled by default to ensure that you set things up the way you want, so be sure to enable it once youāre ready.
Visit the staff category; you should see a new topic there, with āMingleā in the title. This is the template for your message! Click into it, read the instructions, and customize a message to send to your users.
Note that you can specify multiple groups to mix by using the following format for mingle_group_name:
group_1|group_2|group_3
You can also change the size of the groups people are placed in (default is pairs), by changing the āMingle group sizeā option.
If youād like to set a specific time for when the next match will happen, you can do so by clicking on āchangeā next to the next scheduled run time; If you modify either the interval type or interval number (for example, changing from 3 to 4 weeks, or 3 days to 3 weeks), Mingle will automatically reschedule the existing job for the specified time interval.
If things go weird
You can view the next scheduled Mingle in your sidekiq queue at <yoursite.com>/sidekiq/scheduled; itās the one called Jobs::Mingle. Adding it to the queue will perform it immediately, and schedule another one in the future.
If you end up without a scheduled job there somehow, simply disable and then re-enable the Mingle plugin, and it should come back
To stop scheduling Mingles, simply disable the mingle_enabled setting (this will kill the currently scheduled Mingle as well)
If youāve mangled your template beyond repair , you can get the original template back by running
/var/discourse/launcher enter app
rails c
Mingle::Initializer.new.reinitialize!
Contributing
Bug reports
This is currently a beta plugin (I wrote it yesterday ), so please give it a go and report any troubles by mentioning me (@gdpelican) in this topic or in the issues list.
Code
Fork it (https://github.com/[my-github-username]/mingle/fork)
Create your feature branch (git checkout -b my-new-feature)
Commit your changes (git commit -am 'Add some feature')
Push to the branch (git push origin my-new-feature)
Create a new pull request
Be an awesome open source contributor!
Stuff that could happen next
Right now the matches are completely random, but maybe thereās a more better way, taking into account whether a particular pair has been matched before, whether theyāre a seasoned veteran vs a newbie, etc.
Currently if thereās an odd number of people in the group, one person is āleft outā for each set of matches. It would be nice to add that person to a three-person message, or otherwise do something other than ignore them.
I think we may need support for a ādefaultā thing to put in the template if, for example, a user doesnāt have a particular custom field set (right now it will just put in the empty string, which could make for weird sentences like āDid you know that Flynn ?ā)
Very cool!
I think the ability to set the day of week and time of day to do the matchups would be on my immediate wishlist, so people would get the message when they are likely to be around and ready to reply.
And I think multiple text templates would be even better, to keep the bot from repeating itself each time it sends out the scheduled messages, and allow varying the number of people in each message. So you could mingle with just one person one month, then get a group message with 3-5 people the next and so on accompanied by a message template that matches the number of participants.
Yeah, I agree, but copy isnāt my super-strong suit, and of course I would think that every community would want some level of customization there; online communities being a quite different message than in-person work communities, for example.
Maybe you or @erlend_sh or @HAWK or some of the other more wordsy-minded folks could help me get to a better default message there? PRs are, of course, welcome. (I also need to shuffle it around so that that default text there is translatable)
EDIT: if you try this out in your community, Iād love to see what you put for your templates; feel free to send em to me and Iāll cobble together a better default at some point.
I have an idea: to make this viable for new or inactive forums, what about being able to match users that have last signed in the last 7 days (or any set time) so that mingles can be expected to be active. Because if random users get paired, there can be a good chance of pairing with an inactive user. Just a thought
This is so awesome that it makes me want to break my rule of not installing new plugins until theyāve been tested for a while!
One quick suggestion regarding wording: I think it would sound much more inviting if the message title said āYouāve been invited to a mingleā instead of āYouāve been matched for a mingleā.
And some ideas for further development:
It would be very useful to match pairs from different groups. (e.g. on one of my sites users are members of groups to reflect their background (from what perspective they are interested in the forums subject matter) and while it could be useful to match people from the same background (strengthen bonding social capital) it would also be great to match people from different backgrounds (strengthen bridging social capital).
It may be useful to be able to specify the size of the mingle groups. Iām not sure about this because you may need to do it in diads in order to maximize likelihood that a conversation actually takes off (if you know, itās only you and one other person, you may feel more inclined to respond than if you know there are others who can respond instead of you). But, given that the vast majority of any forum is passive, it may also be so that neither of the two matched users responds at all, so that nothing happens at all, wheras if you have, say, four people in a group, you have double the chance that someone makes the first step. And with three instead of one potential respondent, chances are that at least one of them responds. And once that has happened, chances are that the other two also chime in. Itās a matter of trying out, I guess, but my prediction would be that diads will only work if one or both users are rather active/committed users (which gives us yet another reason for suggestion 1 above).
Okay, Iāve done a little bit of stuff here. Here is a list of stuff I did.
Thereās now a āmingle group sizeā option which will allow you to create group sizes of your choosing (2 or more, of course)
I made the default messaging translatable in client.en.yml. If you have an idea for a better default message (title or message body), please PR it.
Iāve added a toggle to the mingle admin panel, which will allow you to specify the exact date and time of the next event at any time.
(NB: this is waiting on a PR to core to add the plugin outlet, so it wonāt show up today.)
So you can now go āI want the events to happen every 4 weeksā, and then change the time of the next event to be, say, Tuesday at 2pm or whatever you fancy.
Iāve made it so that the group input can accept multiple group names delimited by |. So you can put
marketers|engineers
And get matches from both groups (note that there will still be inter-group matches, this simply takes users from both groups and mixes them up)
I merged a PR to translate it into Russian, thanks @Stranik!
Some thoughts on other feedback:
Re having multiple templates. Yes? But Iām not totally convinced of the right method here yet. As an admin, I think Iād much rather update my single template and know whatās going out, rather than having three templates that could go out. Also, since itās a topic with an edit history, if I want to go back to a previous version, itās really easy to do so, meaning you donāt gain a whole ton from having multiple templates; a single topic can currently hold multiple templates through the edit history.
Iām not certain about a recency threshold just yet, but Iām considering it.
Also, could you make this a Wiki topic plz @codinghorror? [Side note, I wonder if thereās appetite for a setting which allows all topics in a category to be wiki topics automatically]
I am so excited for this! Iām now wondering whatās the easiest way for people to move in and out of being paired for a mingle. For example, is there a way to pre-message people in a group and say something like:
Get ready to mingle! If you want to be paired up with another member of the community on August 27th, click here to sign up. If you want to wait until next time, no action needed.
Note: Not interested in mingling anymore? Click here to opt-out of these emails
This would also address the issue @nexo brought up re: inactive users.
Or, maybe a workaround is for the group admin to clear out the group each time and have people add themselves back in? That sounds like a lot of work, thoughā¦
I think you can totally handle this manually for the time being.
Create a new group, minglers for example, and set it to be public and anyone can join and leave
Send out a message to trust_level_1 (or everyone, or people you care about), introducing the program and explaining that itās opt-in. Include a link to yoursite.com/groups/minglers, and instruct them to click āJoinā if they want to be a part.
One-click opt-out seems like a thing we could consider, but for now you could customize your PM template to have something like
Not interested in mingling in the future? Click [here](yoursite.com/groups/minglers) and select āLeaveā to opt-out.
This also seems to be related to āoopsā page crashes, in that mingle and the Iconified Header Links theme somehow conflict. When both are active my rebuild always fails. To fix it I have to:
enter safe-mode
disable Iconified Header Links
load index page
re-enable Iconified Header Links
This only happens when Mingle is installed and active.
This is pretty neat - thanks for creating this plugin and sharing it with the community! Is anyone using it with success? How is it going?
I was just talking with some colleagues in my community about bringing people together around themes of shared interest. E.g. people we know to have shared interest who we think should meet. We already do it on an ad hoc basis, but this plugin came to mind as a means to systematize it and not create more opportunities for connecting and engaging.
I wonder if there might be scope and interest to combine this with the Events Plugin š by @angus, to allow for the creation of scheduled mingle events. The events modal when creating an event topic could have a āthis is a mingle!ā option, which when selected opens up options to set it up including the message template.
Other ideas that spring to mind:
ability to customize the āhostā user who sends the mingle messages, e.g. it could be a moderator in charge of the mingle event.
ability to include a group in the message and add tags for coordinating any followup, which would work well with the Tickets Plugin š by @angus
ability to specify user fields for matching for a specific mingle event, e.g. to connect up people from same country or who share some datapoint in user custom fields
Separately from this itās occurring to me that it would be interesting to be able to grab a list of users in a particular topic or message, and add them to a discourse group to use for various purposes like this. I suspect thereās already a data explorer query for this (is there?) but some UI method for admins would be neat. Being able to take the people who have contributed to an active topic and obviously have shared interest and starting a mingle event for them would be super interesting.
And finally, Iād love to see the Voice recording plugin by @pawel get some love, which would really make mingling a heck of a lot more dynamic and funā¦ letting people save recorded messages to each other.
Here are the /logs errors from hitting it again earlier today:
ArgumentError (comparison of Integer with nil failed) /var/www/discourse/app/models/theme.rb:132:in `sort!'
3:24 pm
Failed to handle exception in exception app middleware : comparison of Integer with nil failed
3:24 pm
The weird thing is, even after removing mingle entirely, including the themes it adds, my site remains broken until I disable Iconified Header Links. Yet, it only ever happens when mingle starts off in the mix. Iām not sure what to make of that, but it seems worth noting.
Any chance you will further develop this plugin to ensure that mingle matches are not from within the same group, when mingling groups? Iām creating a discourse community that will have several user types, all related with one another in the same industry of engineering, and Iād like to mingle them in ways that will be mutually beneficial. It would be less beneficial to mingle those of the same group, at least for my use case. Thoughts?
Circling-back on this. My forum has a focus on humanitarian engineering, and I will have groups of mentors and proteges, as well as those seeking and providing help. It would be great to connect these folks in a targeted way. Has there been any development in ensuring that mingle will not match folks within the same group?