3 ms·
While I really like Pidgin, I really wish their developer reference for plugins were a bit easier to work with/understand. The only thing I find is here: https
by kop316 6y ago
While I really like Pidgin, I really wish their developer reference for plugins were a bit easier to work with/understand.
The only thing I find is here: https://developer.pidgin.im/wiki/CHowTo https://developer.pidgin.im/wiki/CHowTo (Their new website https://pidgin.im/development/ https://pidgin.im/development/ has nothing on making plugins)
But it does not explain things like How to create new chats/IMs, how to create new buddies, what the Buddy List is (Which I found out, the buddy list https://docs.pidgin.im/pidgin/2.x.y/blist_8h.html https://docs.pidgin.im/pidgin/2.x.y/blist_8h.html is NOT a list of buddies that you have, but is a list of things like all of your chats, a list of buddies, and some other things I have yet to figure out, and this is needed for libpurple to understand what chats you do and don't have).
They explain what their APIs do, but I have been typically finding it much easier to look though Matrix's libpurple plugin (or some of the more established plugins) to figure out how they do things like make a new chat room, add buddies, etc.
Perhaps it is also because I have only been looking through others code, but I feel like the APIs are a bit on the limited side (Like trying to add two pictures and text in a single chat, for example. Do I send two files then make text? do I add one picture at a time?).
I hate to say, it makes it really hard to try to make/support/extend plugins.
(For those curious, I have been working to add MMS support to libpurple: https://source.puri.sm/kop316/purple-mm-sms https://source.puri.sm/kop316/purple-mm-sms , so that the Pinephone can have MMS support).
- arbitrage 6y agoI tried to contribute code to the pidgin project a long time ago. I was attempting to flesh out the plugin architecture and functionality (yes, including documentation! i was a big nerd back then. still am, tbh) The guy who ran the project back then was an arrogant sanctimonious asshole. Everything was a goddamn power play with him. I left that project quickly for greener OSS pastures.
- kop316 6y agoThat's really sad to hear. I have been working mainly with the Chatty devs, and they have been great to work with so far. Maybe the v3 API is better, but tbh the v2 API feels very much like it was designed for the AIM/MSN days. Not that there's anything wrong with that, it just makes the plugin architecture feel very inflexible. But the Chatty folks seem to be moving away from libpurple (for much the same reasons), so I don't know how much more I will work with it.
- kop316 6y agoEDIT: So I stumbled a bit across this too: https://pidgin.im/development/faq/ https://pidgin.im/development/faq/ I can say first hand that the info in "How can I create a conversation with someone?" is flat out incorrect. Look here: https://github.com/matrix-org/purple-matrix/blob/master/matrix-sync.c#L128 https://github.com/matrix-org/purple-matrix/blob/master/matr... Before you create a conversation, you need to add it to the blist (buddy list, which is NOT a list of contacts, but something different). If you don't, pidgin has issues displaying the chat! https://github.com/matrix-org/purple-matrix/blob/master/matrix-sync.c#L89 https://github.com/matrix-org/purple-matrix/blob/master/matr... BUT, that will immediately SEGFAULT if you don't have functions such as: https://github.com/matrix-org/purple-matrix/blob/master/libmatrix.c#L124 https://github.com/matrix-org/purple-matrix/blob/master/libm... https://github.com/matrix-org/purple-matrix/blob/master/libmatrix.c#L144 https://github.com/matrix-org/purple-matrix/blob/master/libm... And a couple of others. I only found that because the Chatty dev was able to find this. Even with that, it refuses to remember that you have a chat after closing pidgin. How to fix that? Well that is a great question....as I simply don't know.