Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/cmd list <muc> doesn't list MUC adhoc commands #1949

Open
squeaktoy opened this issue Jan 18, 2024 · 2 comments
Open

/cmd list <muc> doesn't list MUC adhoc commands #1949

squeaktoy opened this issue Jan 18, 2024 · 2 comments
Milestone

Comments

@squeaktoy
Copy link

squeaktoy commented Jan 18, 2024

Some MUCs have special adhoc commands, however while these commands do enter the _command_list_result_handler and win_handle_command_list functions, and they end up inside the cmds GSList object, somehow win_println refuses to print them to the console. I tried debugging it, but it didn't make sense to me.
What I think might be happening is that if the node attribute is a URL or contains special characters like http://prosody.im/protocol/hats#add or p1:hats#list, Profanity won't print them for reasons I don't yet understand. As far as I can see, Profanity uses the node attribute inside the item element in the adhoc commands IQ stanza as the name for the command. For simple server commands, node might be ping, however for MUC commands it's often more complex like http://prosody.im/protocol/hats#add or p1:hats#list. While running /cmd exec http://prosody.im/protocol/hats#add <muc> does work, it's not listed in /cmd list <muc> which bothers me.

Expected Behavior

The /cmd list displays the commands regardless of the complex node attribute. Perhaps internally Profanity might simplify the commands to make them less of a hurdle to type out, or even tab completion?

Current Behavior

Profanity does not list the commands despite their existence as evidenced in /xmlconsole.

Possible Solution

  • List the command anyway.
  • Simplify it to be easy to type.
  • Provide a menu to execute the commands in a GUI-way just like clients such as Gajim, Psi+, or Cheogram do it.

Steps to Reproduce (for bugs)

  1. Create a MUC on an ejabberd server.
  2. In room configuration, enable hats support.
  3. /cmd list <muc> where <muc> is your MUC.
  4. You won't see any commands.
  5. Check /xmlconsole and observe how the ejabberd server did actually supply valid commands.

Context

I want to make use of MUC adhoc commands, but this makes the process of finding them very cumbersome.

Environment

  • Profanity, version 0.14.0dev.master.609fde09
  • Gentoo
  • dev-libs/glib-2.78.3::gentoo
@jubalh jubalh added this to the next milestone Jan 19, 2024
@jubalh
Copy link
Member

jubalh commented Jan 22, 2024

In room configuration, enable hats support.

Could you tell me a public MUC which has this enabled?

@squeaktoy
Copy link
Author

squeaktoy commented Jan 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants