diff options
author | Badlop <badlop@process-one.net> | 2018-03-01 19:45:16 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2018-03-01 19:45:16 +0100 |
commit | ad0fd1eac1745199067d03171dee315b77858a2b (patch) | |
tree | 745269768e67c69544cd01f1c5dd8761de8a68ac /src | |
parent | Merge pull request #2301 from tsaqova/ejabberd_commands_get_room_affiliation (diff) |
Simplify result of get_room_affiliation command (#2301)
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_muc_admin.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mod_muc_admin.erl b/src/mod_muc_admin.erl index 92a68d539..6b6c7d8ca 100644 --- a/src/mod_muc_admin.erl +++ b/src/mod_muc_admin.erl @@ -320,9 +320,9 @@ get_commands_spec() -> args_desc = ["Room name", "MUC service", "User JID"], args_example = ["room1", "muc.example.com", "user1@example.com"], result_desc = "Affiliation of the user", - result_example = {member}, + result_example = member, args = [{name, binary}, {service, binary}, {jid, binary}], - result = {affiliation, {tuple, [{affiliation, atom}]}}} + result = {affiliation, atom}} ]. @@ -1057,8 +1057,7 @@ get_room_affiliation(Name, Service, JID) -> %% Get the PID of the online room, then request its state {ok, StateData} = p1_fsm:sync_send_all_state_event(Pid, get_state), UserJID = jid:decode(JID), - Affiliation = mod_muc_room:get_affiliation(UserJID, StateData), - {Affiliation}; + mod_muc_room:get_affiliation(UserJID, StateData); error -> throw({error, "The room does not exist."}) end. |