Commit Graph

15345 Commits

Author SHA1 Message Date
Harshit Bansal
21dccaedd1 test_events.py: Add a test for the do_change_realm_alias() function. 2017-02-17 11:55:15 -08:00
Harshit Bansal
fec145fc0c zerver/models.py: Add comments in 'get_realm_by_email_domain()` function.
Add necessary comments explaining our query sequence.
2017-02-17 11:55:15 -08:00
Steve Howell
3e3444848d Remove avatar timestamp logic in the client.
We use to have client-side logic that would append timestamps
or random numbers to avatar URLs to force browsers to
refresh their cache.

We no longer need this now that the back end maintains
versions for avatar changes and puts the version in the URLs.
2017-02-17 10:19:56 -08:00
Steve Howell
ad24133b94 Have functions in lib/avatar.py use avatar versions.
In some cases here we simplify things by calling avatar_url()
instead of get_avatar_url(), when we have a user_profile record
handy.  For other cases we pass in an extra avatar_version
parameter to get_avatar_url(), including from avatar_url().
2017-02-17 10:19:56 -08:00
Steve Howell
3a04831793 Add avatar_version to active_bot_dict_fields. 2017-02-17 10:19:56 -08:00
Steve Howell
65a4eb8ec8 Add sender_avatar_version to message caches.
We will use this in computing avatar URLs.
2017-02-17 10:19:56 -08:00
Adarsh S
3c2c0c67b9 Bump user_profile.avatar_version when we change avatars.
We have a field called user_profile.avatar_version that will
track avatar versions and be used tactically in avatar urls
to get browsers to refresh their caches (in future commits).

This commit bumps the avatar version when we update avatars.

We do this in do_change_avatar_fields(), which was
do_change_avatar_source() before this change.

Adarsh did the initial work here, and Steve Howell (showell) also
made changes.
2017-02-17 10:19:56 -08:00
Feorlen
61d4dbddb8 Set a default value of None for EMAIL_HOST in DEFAULT_SETTINGS.
Fixes #3669
2017-02-17 08:02:03 -08:00
Feorlen
1973360d17 Update comment to suggest Mailgun for EmailAuthBackend SMTP. 2017-02-17 08:02:03 -08:00
Abhijeet Kaur
d2929b04ca Remove triage_message() function from all the contrib-bots.
To make all bots consistent add shared function in bot_lib.py
to check if this bot is called. All bots respond to at-mention of
the bot instead of their specific names.
2017-02-17 06:51:48 -08:00
aakash-cr7
b72262e8ec Add UI for seeing all muted topics in settings page.
Fixes #2322.
2017-02-17 00:10:18 -08:00
paxapy
9a5179c460 Add support for managing and deleting attachments.
Modified substantially by tabbott to fix tons of issues.

Fixes #454.
2017-02-16 23:44:44 -08:00
Tim Abbott
f528af2be0 Cleanup some unnecessary calls of get_active_user_dicts_in_realm. 2017-02-16 23:29:07 -08:00
Tim Abbott
51313b6b29 storage: Fix minifying CSS/JS files with unicode in them.
Previously, this header construction work would fail on Python 2 in
the case that there were unicode characters in the input.
2017-02-16 22:24:14 -08:00
Tim Abbott
d564a76f8e alert_words: Consistently clean whitespace for alert words.
This fixes some gaps in handling of whitespace in alert words.
2017-02-16 21:06:18 -08:00
Raghav Jajodia
c1dfa348a1 alert_words: Trim whitespace around alert words.
"Add a new alert word" box now displays an alert when filled with only spaces.
Fixes #3369
2017-02-16 21:06:18 -08:00
Steve Howell
c2eb2e61f9 Bump provision version to 4.5.
We had some recent upgrades to mypy.
2017-02-16 17:54:44 -08:00
Tommy Ip
abf522adfb Add styling to distinguish bots from human users in message view.
With work by Brock Whittaker and Tim Abbott on rebasing + changing
styling.

Fixes #1107
2017-02-16 17:00:21 -08:00
Tim Abbott
845f7c10e5 docs: tweak markdown manual testing docs a bit. 2017-02-16 16:24:12 -08:00
Yago González
3746a857af docs: Add details about local echo with Markdown. 2017-02-16 16:24:12 -08:00
adnrs96
3361502141 Clean tutorial_subject handlebar to use 4 space indents. 2017-02-16 14:45:09 -08:00
adnrs96
5c2d3dc4b7 Clean tutorial_stream handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
dcc9f8d75b Clean tutorial_reply handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
049bfff463 Clean tutorial_home handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
66fcc75e5d Clean topic_sidebar_actions handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
e331288084 Clean sidebar_private_message_list handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
51d0211372 Clean reaction_popover_content handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
45d3eaff5f Clean new_stream_users handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
71063e806b Clean message_reactions handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
dc9a7e17c5 Clean message_info_popover_title handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
71951b6995 Clean message_info_popover_content handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
adnrs96
4a93a7e9d5 Clean group_pms handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
b5507f2de7 Clean bankruptcy_modal handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
65f7ba9861 Clean announce_streams_docs handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
f73df2a882 Clean alert_word_settings_item handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
11c2ef0f49 Clean admin_streams_list handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
a38fe23ea3 Clean admin_filter_list handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
34fd8618e2 Clean admin_emoji_list handlebar to follow 4 space indents. 2017-02-17 03:16:46 +05:30
adnrs96
00dfe80e4d Clean admin_defaults_streans_list handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
Tim Abbott
99c0b0e79f Fix favicon notifications issues for messages sent by oneself.
In Zulip, we mark messages that you send to yourself as read if and
only if they were sent from a known client that represents a human
user use case.  The purpose of this logic is to (1) mark messages
humans send as read while (2) still making it convenient to have a bot
that sends messages to yourself for something like Google calendar,
where you actually want to read those messages.

It's possible that we want to move the control for this behavior into
a client-specific flag rather than doing this off User-Agent.

Fixes #3694.
2017-02-16 13:21:43 -08:00
Steve Howell
5f2e320fee Fix test_valid_api_key_if_user_is_on_wrong_subdomain.
This test would fail if settings.RUNNING_INSIDE_TORNADO
was True, which seemed to happen due to other tests changing
that setting, although I did not fully investigate.
2017-02-15 14:57:01 -08:00
adnrs96
e84cf7b6f1 tools: Create HTML pretty printer.
In This commit we extend the work being done by @showell in PR#1778
to develop a tool to pretty print html and our handlebar templates
in order to enforce our style convention of 4 Space indentation in
templates.

This commit introduces following changes:
* Fix Py3 Compatibility.
* Add ability to prettify in cases when html tags are not the
  starting of a line and addition of test cases for it.
* Add ability to lint handlebar tags and add test cases for it.
* Add {{else}} as special case of indent.
* Add test cases in general to testing new tool.

@showell Helped me throughout and reviewed this commit.

Fixes #1778
2017-02-15 07:34:43 -08:00
Steve Howell
10e220f516 Handle email changes in user_events.update_person().
This code isn't active yet, since the back end doesn't send
events yet for email changes.
2017-02-14 23:25:22 -08:00
Steve Howell
4c53ad59f2 Update PM unread counts more dynamically in the client.
When we process messages for unread counts, we now call
people.pm_reply_user_string() to get a string of user ids,
rather than using emails that may have changed since the
message was originally created.
2017-02-14 23:25:22 -08:00
Steve Howell
ed4adc5650 refactor: Simplify people.pm_reply_to().
We now call people.pm_with_user_ids() to avoid some duplicate
code.
2017-02-14 23:25:22 -08:00
Steve Howell
8d3a5e7f02 Add settings.update_email(). 2017-02-14 23:25:22 -08:00
Steve Howell
0bd3af2bc8 Create narrow.update_email(). 2017-02-14 23:25:22 -08:00
Steve Howell
0eeb023a03 Create filter.update_email().
This helper function will help us process email changes.
2017-02-14 23:25:22 -08:00
Tim Abbott
1acaeb2c80 message_edit: Fix broken triggering of markdown help. 2017-02-14 23:22:37 -08:00
Brock Whittaker
ca428cfc24 Fix tab click unresponsiveness.
There is a particular case in which when a user clicks on a tab, then
uses the goto method to go to another, and then clicks on the original
tab again, it will not load the original tab. This is due to the fact
that the goto function that is used to navigate to a tab without
clicking does not set the last_value, therefore leaving a state that is
incorrect and denying a view update in the case that a user performs
the following:

Click B -> Goto A -> Click B

In this case, it saves the last_value as “B” and so when a user clicks
back on “B” it does not trigger any change as it thinks the user is
going from “B” to “B”.
2017-02-14 23:20:38 -08:00