mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix more tests
This commit is contained in:
parent
2afdde84ea
commit
7e561dd20a
@ -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;
|
||||
|
@ -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):
|
||||
|
@ -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)
|
||||
|
@ -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}),
|
||||
|
@ -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{
|
||||
|
@ -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},
|
||||
|
Loading…
Reference in New Issue
Block a user