Plugin support for creating groups


(Wichall) #1

Hello, I’m totally new to discourse and have tried to get myself stuck in to making a plugin straight away.

Starting to work my around, but can anyone tell me what the best method would be for creating a new group within my plugin?

The end goal is to automatically add invitees to groups, created for each individual inviter.

Would it be best to directly call the GroupsController class or do some sort of post via the js?


(Vinoth Kannan) #2

This feature already available while sending invitations.


(Wichall) #3

Thanks for the fast reply!

Yes it is, but only to existing groups.

I want invitees to automatically be added to a newly created group referencing the inviter (if it’s the inviter’s first invite).

I want this to be automatic, non-optional, separate from the existing optional functionality.


(Vinoth Kannan) #4

You can call GroupsController methods directly from your plugin. Else you can copy codes from save_group method from discourse/groups_controller.rb at master · discourse/discourse · GitHub.

It (Discourse API) will be useful if your creating group from another separate application.