Project

General

Profile

Feature #13136

Post to multiple group forums by email

Added by Matt Gold 12 months ago. Updated 6 months ago.

Status:
Duplicate
Priority name:
Normal
Assignee:
Category name:
Group Forums
Target version:
Start date:
2020-08-01
Due date:
% Done:

0%

Estimated time:

Description

I love the CAC forum feature that allows one to post to multiple groups. Since I'm directing two academic programs that each have separate groups, and since I often get emails I need to forward to both programs, I often to have to take a number of steps to forward a message manually to two groups -- for one, I just forward, but for the second, I have to change the subject line and the message itself enough so that it doesn't trigger the CAC's duplicate post detection. Often this, involves just changing the subject line from "FWD: [top]" to "FW: [topic]", but it's tedious. The alternative is going to the site to post.

I know that posting via email to multiple groups could be hard to implement, but I could imagine that a user could create a special group email address that allowed them to post to multiple groups at once -- e.g., I could create a "group of groups" for my two programs, and sending email to a single address for that group would result in a post to both forums.

I'm not sure how widespread this need is, but I have seen many people post to multiple groups and I increasingly see programs using CAC groups for listserv-like communications.


Related issues

Related to CUNY Academic Commons - Bug #13827: more forum post problemsResolved2021-01-12

Related to CUNY Academic Commons - Support #14072: Posting to multiple groups via emailRejected2021-02-27

History

#1 Updated by Boone Gorges 12 months ago

  • Assignee changed from Boone Gorges to Raymond Hoh

Instead of a new address schema, with a new UI to support the creation and management of such addresses, we can simply change the way that we handle a single message that's sent to more than one address at a time. Say you want to post to three groups A, B, C. So you send to three addresses: group-A@commons, group-B@commons, group-C@commons. When RBE receives the message, it sees that there are three recipients, and the Commons, which has the "multiple group post" feature, is able to hook in at this point and interpret it as a multiple-group-post. This, in turn, will disable the duplicate-post checks, and also trigger the other mechanisms of cross-group posting, such as activity/notification consolidation.

Ray, what would it take to enable this kind of behavior in RBE? Specifically, considering that multiple-group-posting is a custom feature for the Commons. How could RBE be modified so that there's a natural place for us to hook in? Maybe there's a place where you translate the 'To' address into the group ID, we could hook in here and say that group-A is the "primary" forum for this specific post, and then add the necessary metadata so that the cross-posting happens automatically after topic creation (in effect mimicking the cross-post checkboxes when posting from the web)?

In this way, if a user has a collection of groups to which they regularly cross-post, they can set up an address group in their mail client, rather than needing a custom tool for CAC.

#2 Updated by Raymond Hoh 12 months ago

My first thought was to open up the To: field when parsing the email to support multiple group email addresses.

However, this will not work because when you add multiple email addresses to the To: field, this would fire two or more separate emails. We'd only want to parse the initial email and do the multiple post logic in one shot.

My new plan is to support maybe some form of shortcode syntax in the body of the email. So for the To: field, you would put in the main group email address you would want to post to. Then, a shortcode that looks like the following would be in the body of the email:

[post-to-multiple="secondary-group@groups.commons.gc.cuny.edu,tertiary-group@groups.commons.gc.cuny.edu"]

This shortcode would be parsed from the email body to identify the groups that the topic would be cross-posted to.

Then, I'd use the following function from the Multiple Forum Post plugin to fire off the multiple posts:
https://github.com/cuny-academic-commons/bp-multiple-forum-post/blob/master/bp-multiple-forum-post.php#L100

Some work would need to be done to the Multiple Forum Post plugin to ensure that the code could function for a non-logged-in user, since RBE works from a non-authenticated process.

I know the shortcode idea sounds a little cumbersome, but this is probably the best approach from a technical perspective. I know that JetPack's Post By Email feature uses some form of shortcode syntax as well, so this wouldn't be seen as unconventional.

How does that sound?

#3 Updated by Boone Gorges 12 months ago

  • Target version set to 1.18.0

My concern about this is that the syntax is too specific and opaque. Users like Matt will figure it out, but few others will. (Then again, multiple-group-post-by-email is a power-user feature in the first place, so maybe the distinction is not important.)

Totally spitballing, because I have very little understanding of how RBE works, but couldn't the mailbox checker logic account for duplicates? If it sees three identical emails (aside from the recipient +prefix) can't it identify them as being related, designate one as the primary, then mark the other two as duplicates of the first and cease processing them? The advantage here, again, is that we use the existing "syntax" of multiple recipients, which feels much more natural.

Obviously, if this won't work with the RBE internals, then feel free to dismiss :) It would be nice to hear some feedback from Matt on your proposed syntax before moving ahead with it.

#4 Updated by Raymond Hoh 12 months ago

  • Target version deleted (1.18.0)

(Then again, multiple-group-post-by-email is a power-user feature in the first place, so maybe the distinction is not important.)

That was my initial thought. Only a few power users would probably use it.

but couldn't the mailbox checker logic account for duplicates?

The scenario above is if we utilize the Multiple Forum Post plugin specifically to accomplish multiple forum topics by email.

If we don't use the Multiple Forum Post plugin, then we could remove RBE's restriction on the To: field quite easily and then remove the duplicate content check that bbPress uses during posting. (This is all theoretical at the moment.) With this approach, no shortcode syntax would be necessary. This is better for usability, however this posting logic would be executed more than once depending on how many group email addresses are added to the To: field.

You also wouldn't see the "This topic was also posted in" line that the Multiple Forum Post plugin provides when you use this functionality on the frontend, but maybe this isn't that big of a deal.

One other thing I've noted before in another ticket is removing the duplicate content check makes it very easy to spam other groups. Maybe this isn't an issue for us on the Commons, but I note it again just to remind everybody of what could happen.

I think the positives of this second approach might outweigh the negatives, especially if we only limit multiple forum topic functionality to group administrators.

#5 Updated by Boone Gorges 12 months ago

You also wouldn't see the "This topic was also posted in" line that the Multiple Forum Post plugin provides when you use this functionality on the frontend, but maybe this isn't that big of a deal.

Ah. I guess in my mind I was thinking that RBE first collected all the new items from the inbox and did some preliminary parsing, and then looped through those items and created the BP content. In this case, you could use that preliminary step to identify duplicates, before attempting to create the BP content. But if you're doing it in a serial fashion - grab a new email, create the BP content, grab the next email, create the BP content, etc - then I see what you mean. IMO it's not worth rebuilding the internals of RBE just for this purpose.

Your syntax suggestion is sounding more appealing to me, but I do think that Matt should get a chance to OK it before you do too much legwork to make it happen, since he's the main person who will use the feature :)

#6 Updated by Matt Gold 12 months ago

Sure, I think that shortcode would work for me.

I do think that at least a few others would use this, but I suppose we should think about whether this is worth development time if we don't think it would be more widely used. Luke, can you imagine that you would use something like this?

#7 Updated by Luke Waltzer 12 months ago

Maybe, but I doubt I'd use it regularly. Perhaps (or perhaps not) this makes sense as part of a larger set of conversations about group relationships that we've wanted to have... one site connected to multiple groups, subgroups, groups with more granular privacy control, etc...

#8 Updated by Raymond Hoh 12 months ago

Your syntax suggestion is sounding more appealing to me, but I do think that Matt should get a chance to OK it before you do too much legwork to make it happen, since he's the main person who will use the feature :)

The second approach, actually, would be easier to implement because all I'd be doing is removing the duplicate content check during topic posting, while double-checking that the multiple To: addresses actually works properly.

The first approach, adding logic for the BP Multiple Forum Post plugin, would involve more work.

#9 Updated by Boone Gorges 11 months ago

  • Target version set to Future release

#10 Updated by Raymond Hoh 6 months ago

  • Related to Bug #13827: more forum post problems added

#11 Updated by Raymond Hoh 6 months ago

  • Status changed from Assigned to Duplicate
  • Target version changed from Future release to 1.18.3

#13827 will address an issue to allow duplicate forum topics to be posted. This also affects this ticket and will, as a side-effect, allow multiple group topics to be posted via email. You can do this by adding your group topic email addresses to the "To" header in your email client.

The discourse above was mostly an attempt to try and utilize the existing Multiple Forum Post plugin that we use on the frontend for a potential integration with RBE. Most of that entailed a complicated syntax, but I think we don't have to worry about that anymore. I basically implemented the second approach as I mentioned in comment 8.

I'm going to mark this as a duplicate of #13827.

#12 Updated by Matt Gold 6 months ago

That sounds great. Thanks, Ray!!

#13 Updated by Raymond Hoh 5 months ago

  • Related to Support #14072: Posting to multiple groups via email added

Also available in: Atom PDF