-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make privacy list message blocking incoming only #1084
Conversation
@@ -513,8 +513,8 @@ allow_subscription_both_message(Config) -> | |||
escalus_client:send(Alice, escalus_stanza:chat_to(bob, <<"Hi, Bob XYZ!">>)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 513 is too long: escalus_client:send(Alice, escalus_stanza:chat_to(bob, <<"Hi, Bob XYZ!">>)),.
@@ -394,12 +394,12 @@ block_jid_message(Config) -> | |||
timer:sleep(?SLEEP_TIME), | |||
escalus_assert:has_no_stanzas(Alice), | |||
|
|||
%% now Alice try to send a msg to Bob, whom she had blocked, and gets error | |||
%% Blocking only applies to incoming messages, so Alice can still send | |||
%% Bob a message | |||
%% and Bob gets nothing | |||
escalus_client:send(Alice, escalus_stanza:chat_to(Bob, <<"Hi, Bobbb!">>)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 400 is too long: escalus_client:send(Alice, escalus_stanza:chat_to(Bob, <<"Hi, Bobbb!">>)),.
a9c2c98
to
ad4ce15
Compare
client_gets_blocking_error(C) -> | ||
Stanza = escalus_client:wait_for_stanza(C), | ||
escalus:assert(fun is_xep191_not_available/1, [], Stanza). | ||
|
||
client_gets_block_iq(C) -> | ||
escalus:assert(fun is_xep191_push/2, [<<"block">>], escalus:wait_for_stanza(C)). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Line 606 is too long: escalus:assert(fun is_xep191_push/2, [<<"block">>], escalus:wait_for_stanza(C))..
XEP-0016 2.9 describes the <message> blocking system only in terms of incoming messages, however the existing implementation also blocks matching outgoing messages. This change alters the behaviour so that only incoming messages that match `message` privacy list entries are blocked.
25cd17f
to
7330993
Compare
Thanks a lot @bernardd for your contribution! |
XEP-0016 s2.9 describes the
<message>
blocking system only in terms ofincoming messages, however the existing implementation also blocks
matching outgoing messages. This change alters the behaviour so that
only incoming messages that match
message
privacy list entries areblocked.
The reasoning for this is twofold: