The protocol is extendable, so you can theoretically add whatever you want. But make sure to make them unique, so you don’t have problems if we maybe add a similar field in the future as “official”. So maybe prefix them with
friendica_ or something like that.
I also thought about adding a title field for diaspora, but I don’t know if we really need it. Currently we auto-detect the title when displaying the post. But maybe we can split it before sending it (or even give the user control to set the title, but that would be another discussion). But you could simply use such field, unless your title contains BBCode.
About BBCode: For posts that isn’t a problem, diaspora just ignores it and throws it away on receive. For comments I don’t like the idea of also add the BBCode version, because diaspora needs to also store it, for the signature, so it somehow doubles the space needed to store in the database (because we need to store the text twice).
So as simple rule:
- You can add everything you want to normal entities (diaspora will simply ignore/drop it), just make sure you don’t get collisions in the future.
- For relayable-entities: Add fields only if you really need it, because diaspora needs to save the content (for the signatures), so please don’t be wasteful here But if you need it, it wouldn’t be a problem, and if it is useful for others we can maybe even add it to the documentation.
And something slightly off-topic at the end (but since you mentioned BBCode, I want to at least mention it):
I thought about if it would be possible to add Markdown/CommonMark support to Friendica? (Additional to BBCode, because users probably don’t like a hard switch?) So you probably would need a flag if a post was received/created as Markdown or BBCode in the database. Rendering clientside with markdown-it works pretty well at diaspora (so you could probably use the same). And since I use Markdown pretty much everywhere in the internet, it’s maybe also a cool feature for friendica users to use it to write posts? And I think that would help a lot when you don’t need to convert every post between BBCode and Markdown, and with markdown-it it shouldn’t be that hard to display diaspora-posts in the original Markdown format (so you can drop the Markdown to BBCode conversation already). So I know, that that isn’t a quick change (and maybe it isn’t even possible because something blocks it, I don’t know much about friendica), but I just wanted to mention the idea here and you can maybe think about it?