Draft: Create a new-contact and new-contact-data API for adding new contacts through D-BUS
With help I've put together a working draft patch for adding a new contact with data through a D-BUS API. The use case for this is to allow Chatty users to press a button on an SMS from an unknown contact and add that contact easily.
I appear to be wading into some history here. About 6 months ago someone made a ticket [1] about not being able to add a contact from chatty, since chatty has a button for it that has been broken since the GTK4 migration. There was a MR [2] from about 3 years ago that was pretty much abandoned. Someone mentioned in the aforementioned ticket [1] that this work should really be done as an XDG Desktop Portal and pointed to here [3] as a place for organizing such a thing. Looking at that ticket and following some links doesn't seem to show any progress on this issue in the past couple years. Seems like kind of a dead end unless someone decides to put in some elbow grease.
My guess is Purism probably just applied the patch from [2] to their fork and forgot about it. I'm not affiliated with them, but I would really love to be able to easily add contacts from chatty.
[1] #276 (closed) [2] !95 (closed) [3] https://github.com/flatpak/xdg-desktop-portal/issues/15
I recognize that there are probably better and more scalable ways to do this kind of thing. It would be great to be able to do this through an XDG portal. With that said, this patch does solve an immediate need and it works right now. It very probably needs some improvement/work, but I'm willing to do the work if someone can give me some feedback and guidance.
Thanks for considering!
P.S. Thanks go to Chris Talbot's initial work on this for getting me going: https://salsa.debian.org/kop316/gnome-contacts/-/commit/7b1ab4c16c28331fc8f3dad19b8edfcf5833dbff