Skip to content

Conversation

@lerlacher-fm
Copy link
Contributor

This creates a lot of spam, so let's not.

It would maybe be more elegant to make a "would you like to expand these" question box. I'll make that a Fryday task.

@wolfsage
Copy link
Contributor

Hmmm, I don't think I like this...

I noticed the example where you hit a problem, you did roughly:

* https://linear.com/org/issue/TEAM-123/the-description-that-synergy-expands
* https://linear.com/org/issue/TEAM-456/the-description-that-synergy-expands
* https://linear.com/org/issue/TEAM-789/the-description-that-synergy-expands

And then synergy basically repeated your post with TEAM-123 the description that synergy expands with TEAM-123 being a link.

I don't think that behaviour is useful, because synergy is expanding what's already a URL that includes the issue ID and the description of the issue into a different formatted version of the same information.

I think instead synergy should not expand those kinds of urls. That is, if it's already well formed and contains the ticket description, don't bother expanding it...

That way, this kind of post still gets replied to with useful info:

Did:
* TIC-123
* TIC-345
* TIC-678

but we don't double up on https://linear.com/org/issues/FOO-132-here-is-some-details.

I would also have synergy continue to expand https://linear.com/org/issues/FOO-456 if the issue id doesn't contain a description after it..

@lerlacher-fm
Copy link
Contributor Author

@wolfsage I'm not sure what you're proposing to be the exact criteria for when to expand and when not to expand, and I'm not sure it would be useful.

I would also have synergy continue to expand https://linear.com/org/issues/FOO-456 if the issue id doesn't contain a description after it..

How would you code this?

@rjbs
Copy link
Member

rjbs commented Sep 3, 2025

I think @wolfsage was suggesting that we'd expand "without limit" if the message contained only ABC-123 form strings, but up to some limit if they were already URLs. Is that right, Matthew?

@wolfsage
Copy link
Contributor

wolfsage commented Sep 4, 2025

I think @wolfsage was suggesting that we'd expand "without limit" if the message contained only ABC-123 form strings, but up to some limit if they were already URLs. Is that right, Matthew?

Err, no, I think we just don't have a limit, and only expand IDs / URLs that don't include a description.

If I post:

ABC-123
https://linear.com/ABC-345
https://linear.com/ABC-567-this-is-a-problem

The first two would be expanded, the third would not.

@rjbs
Copy link
Member

rjbs commented Sep 4, 2025

I don't have strong feelings here, but I went and looked at some examples of this stuff in a scrum channel and I think I agree with Matthew's preference. If you like, I will do the work to make it work this way, @lerlacher-fm

Shall I, or are you heart-set on the implemented behavior?

@lerlacher-fm
Copy link
Contributor Author

I'm not quite satisfied.

If I post:

ABC-123
https://linear.com/ABC-345
https://linear.com/ABC-567-this-is-a-problem

The first two would be expanded, the third would not.

IMO that is weird behavior that would be surprising to most people; worse, it wouldn't work for my specific bug-bear because sometimes I will just post "ABC-123" rather than the full link.

Would you be happy with the behavior of "if there's more than 3 links, then instead of unfurling, post a <would you like me to unfurl these? yes/no> dialog"?

@wolfsage
Copy link
Contributor

wolfsage commented Sep 5, 2025

What if we had a per-user preference so your things were limited or not expanded but mine were?

@wolfsage
Copy link
Contributor

wolfsage commented Sep 5, 2025

( You could do the "expand yes / no" if you like but I wouldn't want that for my stuff I'd just want it to expand )

@lerlacher-fm
Copy link
Contributor Author

@wolfsage @rjbs I did the simple thing of making it a user pref. Let me know if you like it.

Copy link
Member

@rjbs rjbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two easy fixes. Thanks for making the changes.

@lerlacher-fm lerlacher-fm marked this pull request as ready for review September 24, 2025 22:16
Copy link
Member

@rjbs rjbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One inline suggestion made.

# if there's more than 3 issues to unroll that's probably spam
my $max_matches =
$self->get_user_preference($event->from_user, 'expando-limit');
return unless (@matches <= $max_matches);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return unless (@matches <= $max_matches);
return unless @matches <= $max_matches;

(the parens are not idiomatic in our perl)

Expanding ticket mentions can create a lot of spam.

Introduce a user pref for the max number of ticket mentions to react to,
so it can be limited.
@lerlacher-fm lerlacher-fm force-pushed the le-plat-3066-link-spam branch from 838d9ac to b3bbe99 Compare October 2, 2025 00:16
@lerlacher-fm lerlacher-fm merged commit a92babe into fastmail:main Oct 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants