commands: Add /query support, to create a private chat with another user
Support initiating chats with other users using /query command.
When inside a matrix channel or server user id can be in the form:
@user:server.extuser:server.ext@user(it looks for@user:current-server.ext)user(it looks for@user:current-server.ext)
When inside a channel, can be just the nickname of the user, and we'll figure out the corresponding id.
Re-initiating a left chat is supported, but may need some fixes.
I've just tested this, works great, thanks @3v1n0 ! It would be great to get /names working next :)
Thanks for this! It should fix https://github.com/poljar/weechat-matrix/issues/155 and https://github.com/poljar/weechat-matrix/issues/65
What's needed to get it merged?
I found a bug in commands.py. line 1164 erases the original value of buffer so that lookups on other servers will fail. This causes a problem if you want to manage multiple matrix accounts.