API returns "unfinished" (activity-) notices
Sometimes the API returns notices that is not "finished". They are saved to the DB but e.g. they don't have any object_type yet (or maybe they have a default type, but not the final). This causes activity-notices to render as visible normal notices in Qvitter.
I'm not sure what you think is the best solution. I see two possibilities:
-
Save as much as possible as early as possible in Notice::saveActivity()! (prepare as much as possible to be saved directly after the StartNoticeSave event) I suspect this would also improve performance, since updating a db-row is slow.
-
Add an "unfinished_notice"-field in the notice table, and only select finished notices when delivering streams.