Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Add "server_name" parameter to the join room request #477

Merged
merged 2 commits into from
Jul 18, 2019

Conversation

bmarty
Copy link
Contributor

@bmarty bmarty commented Jul 17, 2019

Related to element-hq/riot-android#3204

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request updates CHANGES.rst
  • Pull request includes a sign off

* Join a room by its roomAlias
*
* @param roomIdOrAlias the room alias
* @param callback the async callback once the room is joined. The RoomId is provided.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc for viaServers is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks

* @param params the extra join param
*/
@POST("join/{roomAliasOrId}")
Call<RoomResponse> joinRoomByAliasOrId(@Path("roomAliasOrId") String roomAliasOrId, @Body Map<String, Object> params);
Call<RoomResponse> joinRoomByAliasOrId(@Path("roomAliasOrId") String roomAliasOrId,
@Query("server_name") List<String> viaServers,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this annotation create queries like server_name=server1.com&server_name=server2.com when they are several viaServers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, see https://square.github.io/retrofit/2.x/retrofit/index.html?retrofit2/http/Query.html
"Passing a List or array will result in a query parameter for each non-null item."

@bmarty bmarty merged commit c630a04 into develop Jul 18, 2019
@bmarty bmarty deleted the feature/tombstone_fix branch July 18, 2019 13:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants