Skip to content

Commit

Permalink
Use Domain instead of MUCLightServer in requests
Browse files Browse the repository at this point in the history
MUC Light admin rest API required a domain to create a room and a muc light domain
for other operations. Now it is unified and uses a domain everywhere.
  • Loading branch information
Premwoik committed Feb 17, 2022
1 parent 2a53e48 commit 04a5863
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions big_tests/tests/muc_light_http_api_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ create_identifiable_room(Config) ->

invite_to_room(Config) ->
Name = <<"wonderland">>,
Path = path([muc_light_domain(), Name, "participants"]),
Path = path([domain_helper:domain(), Name, "participants"]),
escalus:fresh_story(Config, [{alice, 1}, {bob, 1}, {kate, 1}],
fun(Alice, Bob, Kate) ->
%% XMPP: Alice creates a room.
Expand All @@ -155,7 +155,7 @@ invite_to_room(Config) ->

send_message_to_room(Config) ->
Name = <<"wonderland">>,
Path = path([muc_light_domain(), Name, "messages"]),
Path = path([domain_helper:domain(), Name, "messages"]),
Text = <<"Hello everyone!">>,
escalus:fresh_story(Config,
[{alice, 1}, {bob, 1}, {kate, 1}],
Expand Down Expand Up @@ -290,7 +290,7 @@ check_delete_room(_Config, RoomNameToCreate, RoomNameToDelete, RoomOwner,
escalus:assert(is_iq_result, CreationResult),
muc_light_helper:verify_aff_bcast(Members, Affiliations),
ShortJID = escalus_client:short_jid(UserToExecuteDelete),
Path = path([muc_light_domain(), RoomNameToDelete, ShortJID, "management"]),
Path = path([domain_helper:domain(), RoomNameToDelete, ShortJID, "management"]),
rest_helper:delete(admin, Path).


Expand Down
6 changes: 3 additions & 3 deletions doc/rest-api/Administration-backend_swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ paths:
schema:
title: roomJID
type: string
/muc-lights/{XMPPMUCHost}/{roomName}/participants:
/muc-lights/{XMPPHost}/{roomName}/participants:
parameters:
- $ref: '#/parameters/MUCServer'
- $ref: '#/parameters/roomName'
Expand Down Expand Up @@ -504,7 +504,7 @@ paths:
responses:
204:
description: An invite was sent out
/muc-lights/{XMPPMUCHost}/{roomName}/messages:
/muc-lights/{XMPPHost}/{roomName}/messages:
parameters:
- $ref: '#/parameters/MUCServer'
- $ref: '#/parameters/roomName'
Expand Down Expand Up @@ -536,7 +536,7 @@ paths:
responses:
204:
description: Message was sent to the MUC Light room
/muc-lights/{XMPPMUCHost}/{roomName}/{user}/management:
/muc-lights/{XMPPHost}/{roomName}/{user}/management:
parameters:
- $ref: '#/parameters/MUCServer'
- $ref: '#/parameters/roomName'
Expand Down

0 comments on commit 04a5863

Please sign in to comment.