GSoC'23 July Report | Further Progress on the Moderation Tools #5
I have summarized the entirety of July’s work in a single blog post, as I got quite busy with university in the last few weeks 😢.
Progress made on the Report Moderation Tool
I started with the Report Moderation Tool’s further implementation and managed to implement almost all of the features smoothly. However, I encountered a problem with the self-assigning and un-assigning of reports, which caused the application to crash with a segmentation fault. After dedicating hours to using
gdb for debugging, I eventually concluded that the unexpected behavior was likely due to my use of smart pointers. It appeared that the memory was being de-allocated automatically when the object was set to null, and while accessing null when assigning the reports we accessed a
null address leading to Tokodon crashing.
I reached out to the maintainers for their help and review on how to fix this issue. I was suggested to try switching to using raw (normal) pointers to address the problem. I tried refactoring the code in a similar way to resolve the issue. However, the transition from smart pointers to raw pointers proved to be more challenging than I had initially anticipated.
I ended up deciding to take a break from the Report Tool and tackle this at the end.
Some images of the (almost)implemented Report Tool
The draft Merge request implementing the Report tool can be found here.
Federation Tool | Manage federation with other servers
Before beginning with the implementation of the Federation Tool Carl pointed out that I was using expensive
Q_Object to transfer data from
cpp back-end to the
QML front-end which was not optimal. So this time I used the
QAbstractListModel’s built in functions to expose data to the front-end and realized how excellent Carl’s advice was 🥰 .
I felt more comfortable with the code-base now and can intuitively think about my next steps of action. I took my previously written code as boiler-plate and made the required changes in it to fit with the Federation Tool to finally implement the tool.
Carl also made a new
Delegates.SubtitleContentItem delegate UI to display the data in a more responsive and beautiful way and further helped me in implementing this to the Federation Tool.
Image of the implemented Federation Tool
The Merge request implementing the federation tool can be found here.
IP Block Tool | Manage the allowed IPs for your mastodon server
The IP Block Tools implementation was almost similar to the Federation Tools minus a bit of complexity in the data structures used. I used my previously written code as boiler-plate again and built the IP Block Tool on top of that.
Image of the implemented IP Block Tool
The Merge request implementing the IP Block tool can be found here.
Email Block Tool | Manage the email sources allowed to federate
Next tool I started implementing was Email Block Tool. Mastodon provides two kinds of Email block API endpoints: canonical email block and normal email block. Initially, I was skeptical how this would work. However, after further research, I discovered that the official Mastodon website only had the normal email block implemented. I after consulting with Carl, decided to only implement the normal Email Block feature. The canonical email block endpoint didn’t have any clear way to view or manage the blocked emails and would have been confusing for the end user along with the normal Email Block Tool.
The implementation is almost similar to the IP Block Tool and required minor changes to fit the Email Block Tool.
Image of the implemented Email Block Tool
The Merge request implementing the Email Block tool can be found here.
I will be writing regular blog posts on my website. You can read my previous blog-posts and follow my progress here.