@@ -100,7 +100,7 @@ groups() ->
100
100
groupchat_markers_all_reset_room_created ,
101
101
inbox_does_not_trigger_does_user_exist ,
102
102
remove_muclight_messages_after_the_room_is_deleted_xmpp ,
103
- remove_muclight_messages_after_the_room_is_deleted_rest
103
+ remove_muclight_messages_after_the_room_is_deleted_graphql
104
104
]},
105
105
{muclight_config , [sequence ],
106
106
[
@@ -684,8 +684,8 @@ simple_groupchat_stored_in_all_inbox(Config) ->
684
684
remove_muclight_messages_after_the_room_is_deleted_xmpp (Config ) ->
685
685
remove_muclight_messages_after_the_room_is_deleted (Config , xmpp ).
686
686
687
- remove_muclight_messages_after_the_room_is_deleted_rest (Config ) ->
688
- remove_muclight_messages_after_the_room_is_deleted (Config , rest ).
687
+ remove_muclight_messages_after_the_room_is_deleted_graphql (Config ) ->
688
+ remove_muclight_messages_after_the_room_is_deleted (Config , graphql ).
689
689
690
690
remove_muclight_messages_after_the_room_is_deleted (Config , ReqType ) ->
691
691
escalus :fresh_story (Config , [{alice , 1 }, {bob , 1 }, {kate , 1 }], fun (Alice , Bob , Kate ) ->
@@ -710,25 +710,24 @@ remove_muclight_messages_after_the_room_is_deleted(Config, ReqType) ->
710
710
check_inbox (Kate , [# conv {unread = 1 , from = AliceRoomJid , to = KateJid , content = Msg }]),
711
711
712
712
% % Remove the room
713
- destroy_room (Alice , Bob , Kate , Room , ReqType ),
713
+ destroy_room (Config , Alice , Bob , Kate , RoomJid , ReqType ),
714
714
715
715
% % Inbox entries are removed
716
716
check_inbox (Alice , []),
717
717
check_inbox (Bob , []),
718
718
check_inbox (Kate , [])
719
719
end ).
720
720
721
- destroy_room (Alice , Bob , Kate , Room , xmpp ) ->
721
+ destroy_room (_ , Alice , Bob , Kate , RoomJid , xmpp ) ->
722
722
Stanza = escalus_stanza :to (
723
- escalus_stanza :iq_set (? NS_MUC_LIGHT_DESTROY , []),
724
- room_bin_jid (Room )),
723
+ escalus_stanza :iq_set (? NS_MUC_LIGHT_DESTROY , []), RoomJid ),
725
724
escalus :send (Alice , Stanza ),
726
725
AffUsersChanges = [{Alice , none }, {Bob , none }, {Kate , none }],
727
726
muc_light_helper :verify_aff_bcast ([], AffUsersChanges , [? NS_MUC_LIGHT_DESTROY ]);
728
- destroy_room (_ , _ , _ , Room , rest ) ->
729
- Host = muc_light_helper : muc_host () ,
730
- Path = <<" /muc-lights/ " , Host / binary , " / " , Room / binary , " /management " >> ,
731
- {{<< " 204 " >>, << " No Content " >>}, << " " >>} = rest_helper : delete ( admin , Path ).
727
+ destroy_room (Config , _ , _ , _ , RoomJid , graphql ) ->
728
+ Vars = #{<< " room " >> => RoomJid } ,
729
+ graphql_helper : execute_command ( <<" muc_light " >>, << " deleteRoom " >>, Vars ,
730
+ graphql_helper : init_admin_handler ( Config ) ).
732
731
733
732
advanced_groupchat_stored_in_all_inbox (Config ) ->
734
733
escalus :fresh_story (Config , [{alice , 1 }, {bob , 1 }, {kate , 1 }], fun (Alice , Bob , Kate ) ->
0 commit comments