Replace private message threads with Group module

Created on 10 April 2025, 16 days ago

Problem/Motivation

Hi Guys. I'm the original developer of the module. My original use case disappeared many years ago, and you all have done an amazing job at cleaning up and improving my original module! I'm well impressed.

When I originally created the module, I don't think the Groups module existed, or if it did, it was not very fleshed out. But in the intervening years, I've come to use the groups module a lot and get to know it very well. And now suddenly, I have a use case for the Private Message module again for a project I'm working on, and I'm realizing that if I were to build the module again, I would NOT create a private_message_thread entity type, but rather use the Group module to manage thread members. So each private message thread would be a group, with members, and group relationships would be created to the private messages.

The reason I believe this to be a better architecture is that the Group module is made for creating private/public spaces for a set of members. And that's what a private message thread is - a chat between a set of members.

This would also solve the previous issue (I'm not sure if it's been fixed in the intervening years) of not being able to have multiple chats between the same members, as users <-> groups are a many to many relationship, so multiple groups could have the exact same set of users, but own different chats with different titles/labels etc.

Proposed resolution

Fully integrate the Private Message module with the Group module.

Remaining tasks

Create a new Group type: Private Message Thread
Create a new Group Relationship type, for private messages, as messages will be owned by Private Message Thread groups
Remove the Private Message Thread entity type
[Rewire the backend] (Note - this needs to be be expanded into actual tasks)

User interface changes

API changes

Data model changes

🌱 Plan
Status

Active

Version

4.0

Component

Code

Created by

🇨🇦Canada jaypan Victoria, BC

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jaypan
  • 🇨🇦Canada jaypan Victoria, BC

    Please note that I'm just putting this forward as a proposal - I don't have the bandwidth to implement it, nor do I remember the module architecture well enough, nor know the changes that have come about since, to be able to know the work required to bring about this architectural change. I'm just putting forth a proposal for the current maintainers to consider.

  • 🇨🇦Canada jaypan Victoria, BC
  • 🇨🇦Canada jaypan Victoria, BC

    As even further forward thinking, there may even be a case for using the Subgroup module, and making Private Messages a Group type as well, then make them Subgroups of Private Message Threads.
    For example, there could be a Group type of Private Message, and a Group type of Public Message. As each Group/message type would have it's own permissions by role, the public messages could be made visible to non members, with the private messages only visible to members. The thread itself could be made public, but the public would only be able to see the public messages, since they wouldn't have access to the private messages.

Production build 0.71.5 2024