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

Allow specifying server_name parameter values when joining a room #43

Merged
merged 2 commits into from
Nov 27, 2020

Conversation

anoadragon453
Copy link
Member

This PR adds a serverName argument to CSAPI.JoinRoom, allowing clients to populate the server_name query parameter.

Additionally useful for homeservers that don't parse server names from room IDs.

Fixes: #39

Aside: I didn't put any newlines between logical blocks of code as the rest of the codebase doesn't do this, even though I sort of wanted to. Is there a general code style for complement defined anywhere?

@kegsay
Copy link
Member

kegsay commented Nov 27, 2020

Aside: I didn't put any newlines between logical blocks of code as the rest of the codebase doesn't do this, even though I sort of wanted to. Is there a general code style for complement defined anywhere?

gofmt, which allows at most one blank line. I generally use a comment as a separator between logical blocks of code e.g:

// make images
a
b
c
// commit images
d
e
f
// run images
g
h
i

YMMV and I don't care, so long as gofmt is happy.

@kegsay kegsay merged commit a7d6117 into master Nov 27, 2020
@anoadragon453 anoadragon453 deleted the anoa/join_server_name_param branch November 27, 2020 16:27
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

Successfully merging this pull request may close these issues.

TestJoinViaRoomIDAndServerName assumes the homeserver will extract domain names from room IDs
2 participants