Land on Group Messages Component

AI-generated summary

The ‘Land on Group Messages Component’ is a deprecated theme component for Discourse that redirects users to a group’s messages page (e.g., /g/group-slug/messages) instead of the members page when clicking on a group link — but only if the user is a member and group messages exist. It was designed to simplify access to private group communications without needing separate categories. The component, created by nathank following support from @Johani, has no settings and is installed via GitHub: github.com/nathan-nz/discourse-group-messages-land. It was later updated to fix browser console warnings post 2, but a bug emerged affecting the /g (All Groups) page due to a core Discourse commit post 3. The component was temporarily patched to disable functionality on that page. nathank also sought help to add compatibility with the Discourse Sidebar, aiming to redirect sidebar group message links from /u/username/messages/group/group-slug to /g/group-slug/messages. Ultimately, nathank concluded the component is no longer useful or functional and marked it as deprecated.

This Theme Component redirects links to Groups so that they land on the Group Messages rather than on the Group Members.

The use-case for this is when your Forum makes extensive use of Groups, but you don’t want to set up an individual Category for private communications for each one.

The /g/group-slug/messages page can function as a topic list for these Groups without any further admin input. Unfortunately, these pages are somewhat buried, and several clicks are required to reach them.

This Component makes the Group Messages page the default landing page whenever a Group is clicked upon. This makes finding and using Group Messages (especially older ones) much more intuitive for users. It only does this when

  1. Group messages exist for the group and
  2. The user is a member of the group

This Component was made to formalise the amazing support of @Johani as a result of this conversation:

There are no settings. Simply install and activate it.

12 Likes

Just updated the TC so it no longer throws a warning in the browser console:

https://github.com/nathan-nz/discourse-group-messages-land/commit/5e79ca2fc50945d09613aebf2f147affca50084c

4 Likes

There is a problem with the component at the mo, manifesting on the /g page:

It seems to be related to this commit in core:
https://github.com/discourse/discourse/commit/58e59e357964533c2734b054e78f5c0824ca60f8

I’ve temporarily turned off the functionality on that page until I can get it fixed properly:

https://github.com/nathan-nz/discourse-group-messages-land/commit/6ba623d94e76f503e55398be9c6bd2cd364422b2

Also new feature - adding Sidebar compatibility

While at it, I’m also very keen to add compatibility with the new sidebar.

I’m trying to work out how to redirect the group message links on the Sidebar which currently go to this:

  • /u/username/messages/group/group-slug

I’d like them to go to this instead:

  • /g/group-slug/messages

Can anyone help with either of these? Both are too high level for me.

3 Likes

I don’t think that this component really has a place any longer (if it works at all). Therefore I’ve placed a deprecated tag on it.

3 Likes