Skip to content

Add support for userless (System) forum replies, bang commands. #230

Open
@MauAbata

Description

@MauAbata

Forum threads should have support added for system messages, such as Locked/Unlocked, Merged, etc. posts.

And, for the time being, bang-commands should be parsed out of admin/moderator posts and handled in an after-save async job on the forum post. Workflow:

  1. New Forum reply is created,
  2. After commit, scan for /^!\w+/ lines and if any are found, schedule a Forums::CommandProcessorJob to run on that post.

In the Command Processor Job:

  1. Scan each line for any matching bang commands and their arguments,
  2. Validate permissions for each using Pundit, and take the appropriate action,
  3. Log a system post to the thread regarding that action taken.

For the System Posts:

Post content is a serialized collection of data required to render the notification, which includes a proper I18N key for the message to be displayed and placeholders to fill in that message. Or something.

Usecase:

!merge <url>
!lock
!unlock
!makesticky
!clearsticky
!flagdelete
!move <forum>
!resolve

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions