mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
compose: Check posting policy for direct messages.
Prior this commit, changing the message type from a stream (where posting was not allowed) to a direct message using the compose box dropdown, did not changed the state of the send button from disabled to enabled even though direct messages were allowed in the organization. This was happening because `check_stream_posting_policy_for_compose_box` was only for streams. Now, function is updated to check for both streams and direct messages, as it checks if direct messages are allowed or not, and depending on that, it updates the send button's state, tooltip and displays a relevant banner.
This commit is contained in:
committed by
Tim Abbott
parent
ee88bb5187
commit
cb00fbc42f
@@ -164,6 +164,11 @@ test("basics", () => {
|
||||
|
||||
assert.equal(stream_data.slug_to_name("99-whatever"), "99-whatever");
|
||||
assert.equal(stream_data.slug_to_name("99whatever"), "99whatever");
|
||||
|
||||
// sub_store
|
||||
assert.equal(sub_store.get(-3), undefined);
|
||||
assert.equal(sub_store.get(undefined), undefined);
|
||||
assert.equal(sub_store.get(1), denmark);
|
||||
});
|
||||
|
||||
test("get_subscribed_streams_for_user", () => {
|
||||
|
||||
Reference in New Issue
Block a user