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

feature request: command to go to room/chat #357

Open
dvdsk opened this issue Sep 25, 2024 · 5 comments
Open

feature request: command to go to room/chat #357

dvdsk opened this issue Sep 25, 2024 · 5 comments

Comments

@dvdsk
Copy link

dvdsk commented Sep 25, 2024

I have tried adding a macro that goes to the chat however the macro only opens the chats screen. This might be the wrong way to do that too. Could we have a command to open a room/dm/space?

[macros.normal]
"gy" = ":chats<Enter>/Name (DM)<Enter>" 
@dvdsk
Copy link
Author

dvdsk commented Sep 25, 2024

Since this is my third feature request here 😅 it seems only fair to start contributing. I have looked at the source and I think I can implement this. The question now is what the command should be.

Since we have rooms, chats, spaces & dms to open lists it seems logical
to me to add room, chat, space & dm commands with as argument the room/chat etc specifier.

It would be nice to be able to auto complete them but that should be done once
the commands work.

Ill go look at how the current commands work while I wait on your reponse.

@ulyssa
Copy link
Owner

ulyssa commented Sep 26, 2024

Does :join do what you want? You can pass a username, room alias or room identifier and it will open it even if you're already joined.

@ulyssa
Copy link
Owner

ulyssa commented Sep 26, 2024

So you could do something like:

[macros.normal]
"gy" = ":join @user:example.com<Enter>" 

I have plans to make this hopefully a little easier by adding a simple command DSL that can describe these instead of having to do it in terms of key presses.

@dvdsk
Copy link
Author

dvdsk commented Sep 26, 2024

Does :join do what you want? You can pass a username, room alias or room identifier and it will open it even if you're already joined.

I tried that, unfortunately that gave:
Matrix client error: the server returned an error: [403 / M_FORBIDDEN] M_FORBIDDEN: You don't have permission to view this room.

Even though I can just access the room by doing :chats then navigate there using <UP> & <DOWN> followed by <ENTER>.

So I just assumed that :join was for joining new rooms only. It makes sense that you could also use :join for opening an existing room 👍 .

Note that I am using a custom home server (conduit). Ill make a matrix.org account and test on that.

@dvdsk
Copy link
Author

dvdsk commented Sep 26, 2024

okay so:

with the matrix.org homeserver

  • :join @<name>:<homeserver.domain> works
  • :join !<internal room id>:<homeserver.domain> works

with my own conduit based homeserver

  • :join @<name>:<homeserver.domain> gives the 403 described above
  • :join !<internal room id>:<homeserver.domain> works

So I guess it could be a bug conduit. It might be an idea to let :join switch to the room directly if the room is already joined.

For me, and I think anyone, using the is a good solution/workaround.

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