- If subject is empty when sent, we assign “[no title]”.
- If subject is empty when we receive a private message via ActivityPub, we create one based on the body by converting it from BBCode to Plaintext (expensive).
- When we reply to a private message, we use the parent message subject, which should always be filled thanks to the previous behaviors.
I first removed the first two subject-filling behaviors and created a subject on the fly in the message list, but it both expensive, so I created a separate field for it to compute it only once.
But then I found out about the Diaspora and Twitter API integration, and then I realized I didn’t know which protocol actually needed the title to be set, which halted my work.