25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix more tests

This commit is contained in:
Paweł Chmielowski 2018-01-25 18:43:34 +01:00
parent 2afdde84ea
commit 7e561dd20a
6 changed files with 11 additions and 11 deletions

View File

@ -169,11 +169,11 @@ recv_carbons(Config) ->
recv_message(Config),
case Dir of
send ->
#carbons_sent{forwarded = #forwarded{xml_els = [El]}} =
#carbons_sent{forwarded = #forwarded{sub_els = [El]}} =
xmpp:get_subtag(CarbonMsg, #carbons_sent{}),
#message{body = Body} = xmpp:decode(El);
recv ->
#carbons_received{forwarded = #forwarded{xml_els = [El]}}=
#carbons_received{forwarded = #forwarded{sub_els = [El]}}=
xmpp:get_subtag(CarbonMsg, #carbons_received{}),
#message{body = Body} = xmpp:decode(El)
end;

View File

@ -69,7 +69,7 @@ all_master(Config) ->
items =
[#ps_item{
id = <<"pep-1">>,
xml_els = [PepPayload]}]}}]},
sub_els = [PepPayload]}]}}]},
PepTwo = #message{
to = Peer,
sub_els =
@ -80,7 +80,7 @@ all_master(Config) ->
items =
[#ps_item{
id = <<"pep-2">>,
xml_els = [PepPayload]}]}}]},
sub_els = [PepPayload]}]}}]},
%% Wait for the slave to become inactive.
wait_for_slave(Config),
%% Should be queued (but see below):

View File

@ -361,7 +361,7 @@ recv_archived_messages(Config, From, To, QID, Range) ->
sub_els =
[#forwarded{
delay = #delay{},
xml_els = [El]}]}]} = recv_message(Config),
sub_els = [El]}]}]} = recv_message(Config),
#message{from = From, to = To,
body = Body} = xmpp:decode(El)
end, Range).
@ -443,7 +443,7 @@ recv_messages_from_room(Config, Range) ->
sub_els =
[#forwarded{
delay = #delay{},
xml_els = [El]}]}]} = recv_message(Config),
sub_els = [El]}]}]} = recv_message(Config),
#message{from = MyNickJID,
type = groupchat,
body = Body} = xmpp:decode(El)

View File

@ -85,7 +85,7 @@ all_master(Config) ->
node = ?NS_MIX_NODES_PARTICIPANTS,
items = [#ps_item{
id = ParticipantID,
xml_els = [PXML]}]}}]} =
sub_els = [PXML]}]}}]} =
recv_message(Config),
#mix_participant{jid = MyBareJID} = xmpp:decode(PXML),
%% Coming online
@ -106,7 +106,7 @@ all_master(Config) ->
node = ?NS_MIX_NODES_PRESENCE,
items = [#ps_item{
id = PresenceID,
xml_els = [Presence]}]}}]}),
sub_els = [Presence]}]}}]}),
#message{from = Room,
sub_els =
[#ps_event{
@ -114,7 +114,7 @@ all_master(Config) ->
node = ?NS_MIX_NODES_PRESENCE,
items = [#ps_item{
id = PresenceID,
xml_els = [Presence]}]}}]} =
sub_els = [Presence]}]}}]} =
recv_message(Config),
%% Coming offline
send(Config, #presence{type = unavailable, to = Room}),

View File

@ -599,7 +599,7 @@ set_node_config(Config, Node, Options) ->
publish_item(Config, Node) ->
PJID = pubsub_jid(Config),
ItemID = randoms:get_string(),
Item = #ps_item{id = ItemID, xml_els = [xmpp:encode(#presence{id = ItemID})]},
Item = #ps_item{id = ItemID, sub_els = [xmpp:encode(#presence{id = ItemID})]},
case send_recv(Config,
#iq{type = set, to = PJID,
sub_els = [#pubsub{publish = #ps_publish{

View File

@ -220,7 +220,7 @@ recv_test_message(Config) ->
handle_notification(Config) ->
From = server_jid(Config),
Item = #ps_item{xml_els = [xmpp:encode(#push_notification{})]},
Item = #ps_item{sub_els = [xmpp:encode(#push_notification{})]},
Publish = #ps_publish{node = ?PUSH_NODE, items = [Item]},
XData = #xdata{type = submit, fields = ?PUSH_XDATA_FIELDS},
PubSub = #pubsub{publish = Publish, publish_options = XData},