How to Disable The New "Added By..." that's added into the Staff Notices Feature?

AI-generated summary

In a Support discussion titled How to Disable The New “Added By…” that’s added into the Staff Notices Feature?, gassim reports that Discourse now automatically appends “Added by @username” to staff notices — a change that interferes with their workflow. They give two examples: automated notices (e.g., “Made their first post”) that they manually update with role info (e.g., “Product Manager in Analytics Team”), and resource follow-ups (e.g., “:video_camera: Recording”) — in both cases, the “Added by” tag is unnecessary and visually disruptive. gassim suggests that if attribution is needed, it can be added manually or retrieved via Data Explorer or Admin logs. Arkshine confirms there’s no built-in setting to disable this, but offers a JavaScript workaround using a theme component to remove everything after the first paragraph in staff notices. The code targets .post-notice-message and strips out the appended attribution. Bas adds a helpful note: the “Added by” text is only visible to other staff members, not regular users — a point Arkshine acknowledges as useful context. The workaround is functional for staff-only viewing needs, though not a native setting.

Hi
I noticed that we now have a new change in staff notices where an “Added by Name-of-staff” is systematically added to the staff notice that’s added by the staff or the admin.

However, in our use case, there are staff notices where we don’t need nor want to include this additional enforced ‘Added by Name’:

  1. When it has been a while for a staff to make a post there’s an automated staff notice: “Person hasn’t made their post in a while…etc” or if it’s their first post “Made their first post, welcome them to the community”, which I change to the position and role of that staff. For example, I remove the automated staff notice and I update it to something like “Person is a Product Manager in the Analytics Team.” Therefore, in this case, I don’t want it to be “Person is a Product Manager in the Analytics Team (Added by @gassim)” :cry:
  2. When the post is a follow-up post with resources, slides, or recording, I or one of the staff reply with the links to the resources, and above it I add a staff notice such as " :video_camera: Recording" and I don’t want it to show " :video_camera: Recording (Added by @gassim)"

In the above use case, it’s not relevant for us to include the name. If we really need to figure out who added the staff notice, we can use Data Explorer or from the Admin > log > Staff actions - Action: ‘add staff note’.

If we want staff to include the (Added by) we can do that manually in the case that we do want to include that.

Is there a way to disable this new feature?

Thank you!

There is no setting solution for this. You can achieve this with some javascript, though:

In your theme or a new theme component, add the following in the JS tab:

import { apiInitializer } from "discourse/lib/api";
import { schedule } from "@ember/runloop";

export default apiInitializer((api) => {
  const current = api.getCurrentUser();
  if (!current || !current.staff) {
    return;
  }

  // Removes anything after the first paragraph 
  // containing the staff notice.
  api.decorateCookedElement((element, helper) => {
    const post = helper?.getModel();
    if (!post || !post.notice) {
      return;
    }

    schedule("afterRender", () => {
      const postNoticeMessage = document.querySelector(
        `article[data-post-id="${post.id}"] .post-notice-message`
      );

      if (postNoticeMessage) {
        postNoticeMessage.replaceWith(postNoticeMessage.firstChild);
      }
    });
  });
});

It should be good enough.

I will note that these “added by” are only shown to fellow staff, so regular users will not see them.

Thanks Bas, good point!