An update from last night brings some additional logic to the title generation of topics from the fediverse.
Previously if a title was provided in the name property, that was used as the topic title.
While that hasn't changed (and is the strongest signal for a topic title), not all fediverse content contains titles. Specifically, Mastodon posts do not require or even have a space to put a title in.
For those cases, we fall back to generating one based on the content. We literally grabbed the first 128 characters or so, and added an ellipsis to the end.
While that worked okay as a stopgap, it meant that a lot of topics ended up with really long titles — not ideal.
The new logic tries to grab the first line of text (either the first <p> or line), and from there, the first sentence, using some naive regular expressions.
While still not a proper alternative to... you know... specifying a title, it's better than nothing I suppose!
I wonder if other fediverse softwares implement title generation logic like this...
I should say, rather, that I get why it was done, and bonus points for just getting it done, but it reads like so much like "hack it until it works" methodology that I feel like we ought to be better than that by now.
…not all fediverse content contains titles. Specifically, Mastodon posts do not require or even have a space to put a title in.
Hubzilla dealt with that issue by putting the title of the post in the post itself, so people on Mastodon and other platforms could see the title. So the title is transmitted in both the title field, and in the body field. It looks redundant, but I see what they did it that way, especially since Mastodon is so dominant in the space.