Bug 37570

Summary: Support for Ad-hoc commands (XEP-0050)
Product: Telepathy Reporter: Matej Cepl <mcepl>
Component: gabbleAssignee: diane
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: devurandom, MurzNN
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: snapshot of progress

Description Matej Cepl 2011-05-25 03:25:58 UTC
See http://xmpp.org/protocols/commands/ for more info. Specifically it requires support for http://xmpp.org/extensions/xep-0050.html and http://xmpp.org/extensions/xep-0004.html (the latter is said to be supported in Wocky).
Comment 1 big.smile 2015-08-29 03:44:09 UTC
Any news about that?
Comment 2 diane 2016-07-13 07:04:07 UTC
(In reply to Matej Cepl from comment #0)
> See http://xmpp.org/protocols/commands/ for more info. Specifically it
> requires support for http://xmpp.org/extensions/xep-0050.html and
> http://xmpp.org/extensions/xep-0004.html (the latter is said to be supported
> in Wocky).

From what I can see wocky can parse XEP-0004 forms and can format a response. What wocky can't do is display the form for a user to fill out. (And that's a difficult issue given that the user interface to gabble is provided by either Empathy or KDE Telepathy)

However, I've been working on a prototype that uses telepathy-gabble-xmpp-console, which gives advanced access to the XMPP stream via a gabble plugin.

Currently my prototype does everything in python and uses the SendIQ feature provide by the XMPP console plugin.

I think it'll be easier to discuss what's needed for a proper implementation with a prototype in hand.
Comment 3 George Kiagiadakis 2016-07-18 18:30:23 UTC
(In reply to diane from comment #2)
> I think it'll be easier to discuss what's needed for a proper implementation
> with a prototype in hand.

I suppose that you need to figure out a D-Bus API for exposing this feature, then implement it in Gabble and expose it using the Connection.Sidecars interface.

The client you can implement as you wish. There are examples in tp-glib and tp-qt iirc for adding spec extensions to your build and using them.
Comment 4 diane 2016-10-07 17:24:40 UTC
Created attachment 127113 [details] [review]
snapshot of progress

I got busy and stopped making progress for a while, but I should share what I did so far. Since I'm primarily a python programmer I implemented XEP-50 as pure python in telepathy-gabble-xmpp-console (and maybe included a few python3 fixes.

This shouldn't be committed, the attached patch is too large and the XML parsing should be in the C plugin and not hacked in using python's xml parsers. I just wanted to try it, and think about the UI.

For some version of the command mode browsing, issuing commands, and generating forms worked. However I didn't manage to implement notes. (some commands return a note and not a form.)

I tried to add a service discovery browser, but I'm not sure how it should work  work on muc servers. Large MUC servers can return large large lists of rooms.
Comment 5 GitLab Migration User 2019-12-03 19:52:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/149.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.