Spring is comming¶
Storage sqlite and integration testing¶
I've been slowly adding features to the sqlite storage backend. It’s still not done, even though it passes all tests. This served to show me that the current test suite is insufficient so I spent a considerable chunk of time on improving it.
The ongoing plan is to add more tests, at least some that cover the filters used by go-littr.
Storage fs¶
Another major improvement was done for the fs storage backend where now the symlinks that were used to refer to an activity/object from another collections are no longer absolute, but relative. This allows for easier move of the whole storage folder, which wasn’t really possible before. Previously it required an export/import from the fedboxctl command.
Cache invalidation fix¶
For sometime I was bugged by how new comments on a post (on littr.me) didn’t show up correctly on the page, but I had failed to find the cause. I finally manadged to find and fix it.
The problem consisted of having only an IRI not a full object when trying to load its inReplyTo items. This required changes in the processing package.
Filtering fixes¶
In the existing configuration we were filtering out non public items at the handler level but only for collections. This somehow got overlooked for the item handler, which allowed direct access to objects/activities that should have been visible only with valid OAuth tokens.
Another fixed filtering bug was related to the search on the moderation page. We now display correctly any combination of searched items: accounts, submissions or comments.
Local caching for activities of the logged in account¶
To avoid having to load from the AP backend the current account’s activities, we now store them in the session, in the limit of 1MB. This is an interim solution, before I decide exactly what type of in memory cache to use for this.
Binary marshaling first steps¶
Made a little bit of progress on the gob encode/decode for the ActivityPub objects. This will allow us to save binary blobs instead of json for the following storage backensds fs, badger and boltdb.
Improved errors¶
The error objects in the errors package now append their message to the one of the parent error, if one is embedded. We still need a small improvement to append also the backtrace for DEV environments.