weechat-matrix-protocol-script icon indicating copy to clipboard operation
weechat-matrix-protocol-script copied to clipboard

Multiple account support

Open dluciv opened this issue 9 years ago • 5 comments

Like Jabber, Matrix allows it and probably even assumes it =)

dluciv avatar Jun 21 '16 20:06 dluciv

This is on my list of things that would be nice, and it's doable, but no plans to implement currently.

I think the work to support this consists mostly of making sure no globals are abused to store account-local information, and that the findroom-mechanisms always finds the correct account. And also have settings/configuration to support it. Maybe a new configuration file would be needed to make the user experience nice for this.

torhve avatar Jun 23 '16 16:06 torhve

BTW I tried to rename plugin and then to change:

local SCRIPT_NAME = "othermatrix"

It saved its config correctly with othermatrix name, but failed to execute /othermatrix connect, so some globals are likely used here =)

dluciv avatar Jun 28 '16 15:06 dluciv

That's an interesting workaround which should have worked! I tested locally and made a few changes to make it slightly better, and it seems to work fine. Now there's a othermatrix server buffer and a matrix serverbuffer, and the /matrix connect command will get printed correctly too. Depending on your log filename format that might have some problems still.

torhve avatar Jun 28 '16 16:06 torhve

When I do so, I periodically saw:

weechat =!= | Call to API errored in command url:https://matrix.dluciv.name/_matrix/client/r0/login, maybe timeout?

Where matrix.dluciv.name is my homeserver. It is not always so and sometimes it happens so to matrix.org server while my one works ok.

dluciv avatar Jun 29 '16 11:06 dluciv

That is unrelated, and just the script telling you it has problems connecting to the homeserver. Could be anything really, network problems, timeouts, dns, etc. Check your serverlogs, and you can also get debug information out of matrix using /matrix debug (but it is very spammy)

torhve avatar Jun 29 '16 11:06 torhve