Steve Howell
8302689789
Extract Message.is_stream_message().
...
This sets us up to denormalize on to Message some notion of
whether a message is for a stream (without having to hit the
Recipient table).
2017-10-28 17:57:39 -07:00
Steve Howell
8b012c6210
Extract get_personal_recipient().
2017-10-28 17:57:39 -07:00
Steve Howell
64211512f8
Avoid mutation in get_recipient_from_user_ids.
...
We shouldn't mutate parameters in a `get_foo` function.
2017-10-28 17:57:39 -07:00
Steve Howell
370ffe389c
Extract get_huddle_recipient().
...
This extraction moves all the huddle logic into models.py, which
hopefully can reduce friction for things like re-organizing our
caches (there are two cache entries for every huddle) and/or
just putting huddle_id on Message directly.
2017-10-28 17:57:39 -07:00
Steve Howell
a28841e8aa
Extract get_stream_recipient().
...
Do you call get_recipient(Recipient.STREAM, stream_id) or
get_recipient(stream_id, Recipient.STREAM)? I could never
remember, and it was not very type safe, since both parameters
are integers.
2017-10-28 17:57:39 -07:00
Rishi Gupta
b7a9068724
mobile: Update docs and portico URLs to point to new Android app.
2017-10-28 15:27:29 -07:00
Harshit Bansal
5020ba4a20
emoji: Allow users to change emoji set.
...
This feature was merged in PR #4383 but was disabled due to some
remaining emoji infra changes.
Fixes : #209 .
2017-10-28 10:38:33 -07:00
Harshit Bansal
56f26c2d6f
zproject/settings.py: Correct emoji sprite CSS files.
2017-10-28 10:38:33 -07:00
Harshit Bansal
4c077a77ed
notifications: Instead of regex use lxml for fixing emojis.
2017-10-28 10:38:33 -07:00
Harshit Bansal
1067cfd92a
node_modules: Add npm packages for the supported emojisets.
...
This commit adds emoji datasource packages for the rest of the emojiset
packages which we will use for serving images in notifications.
2017-10-28 10:38:32 -07:00
Steve Howell
d132c30c24
Remove `active` parameter from `do_create_user()`.
...
Almost all callers to do_create_user were trying to
create active users, except for one test. The
active=False codepath was kind of broken (things
like sending welcome messages had sort of undefined
behavior there), so instead of trying to maintain it,
we just update the one test (`test_people`) to flip the
`is_active` flag manually.
Fixes #7197
2017-10-28 10:32:01 -07:00
Steve Howell
d6c47573b2
Eliminate ZulipTestCase.send_message().
...
Now all tests use these three messages instead:
send_stream_message
send_personal_message
send_huddle_message
2017-10-28 10:20:59 -07:00
Steve Howell
c978464d16
tests: Fix send_message calls in test_user.py.
2017-10-28 10:20:59 -07:00
Steve Howell
610d9b4abc
tests: Fix send_message calls in test_unread.py.
2017-10-28 10:20:59 -07:00
Steve Howell
a20bba04ca
tests: Fix send_message calls in test_tutorial.py.
2017-10-28 10:20:59 -07:00
Steve Howell
bb42004464
tests: Fix send_message calls in test_subs.py.
2017-10-28 10:20:59 -07:00
Steve Howell
fba754224c
tests: Fix send_message calls in test_soft_deactivation.py.
2017-10-28 10:20:59 -07:00
Steve Howell
6475b25a00
tests: Fix send_message calls in test_signup.py.
2017-10-28 10:20:59 -07:00
Steve Howell
f264bbc7ca
tests: Fix send_message calls in test_service_bot_system.py.
2017-10-28 10:20:59 -07:00
Steve Howell
8276442ee6
tests: Fix send_message calls in test_retention.py.
2017-10-28 10:20:59 -07:00
Steve Howell
1f077f7177
tests: Fix send_message calls in test_reactions.py.
2017-10-28 10:20:59 -07:00
Steve Howell
74943b4120
tests: Fix send_message calls in test_notifications.py.
2017-10-28 10:20:59 -07:00
Steve Howell
26e51c016d
tests: Fix send_message calls in test_narrow.py.
2017-10-28 10:20:59 -07:00
Steve Howell
5c00bbc1a9
tests: Fix send_message in test_message_edit_notifications.py.
2017-10-28 10:20:59 -07:00
Steve Howell
cf1a4540ef
tests: Fix send_message calls in test_link_embed.py.
2017-10-28 10:20:59 -07:00
Steve Howell
fd9d919fc6
tests: Fix send_message calls in test_home.py.
2017-10-28 10:20:59 -07:00
Steve Howell
1c38130626
tests: Fix send_message calls in test_export.py.
2017-10-28 10:20:59 -07:00
Steve Howell
3e319837ef
tests: Fix send_message calls in test_events.py.
...
We mostly introduce these functions (as part of a big
code sweep):
send_stream_message
send_personal_message
send_huddle_message
In two cases, where we want to specifically manipulate
queue ids, we now call check_send_message directly. (The
above three functions deliberately don't support kwargs
to ensure simple code and better type safety.)
2017-10-28 10:20:59 -07:00
Steve Howell
25379a3b19
Fix send_message calls in test_embedded_bot_system.py.
2017-10-28 10:20:59 -07:00
Steve Howell
4372bfb4a5
tests: Fix send_message calls in test_bugdown.py.
2017-10-28 10:20:59 -07:00
Steve Howell
7cf5be2266
tests: Fix send_message calls in test_alert_words.py.
2017-10-28 10:20:59 -07:00
Steve Howell
53ad6270b4
tests: Fix send_message calls in test_event_queue.py.
2017-10-28 10:20:59 -07:00
Steve Howell
9c90c40c08
tests: Fix send_message calls in test_upload.py.
2017-10-28 10:20:59 -07:00
Tim Abbott
f2e3e779eb
mypy: Properly annotate generic_bulk_cached_fetch.
...
Along with fixing some minor bugs, this requires extracting out the
default functions so that we can do type: ignores on them properly.
While we're at it, we switch to the Python 3 syntax.
2017-10-28 10:07:15 -07:00
Tim Abbott
73c27e1277
cache: Fix type aliasing of cached_objects.
...
Previously, it was converted from a CompressedItemT to an ItemT
without changing the variable name.
2017-10-28 10:01:44 -07:00
Tim Abbott
94c1da7025
cache: Move generic_bulk_cached_fetch typevars up a bit.
2017-10-28 10:00:43 -07:00
Tim Abbott
5b5dffebe7
get_messages_backend: Tweak how search fields are added.
...
This is a no-op, but makes mypy happier, since previously it wanted to
know the type of the {} we were passing to `.update()`.
2017-10-28 09:58:51 -07:00
Tim Abbott
6c242379f4
bugdown: Remove unused caching imports.
2017-10-28 09:02:36 -07:00
neiljp (Neil Pilgrim)
232bcd98b3
mypy: Improve return type of internal_notify_view decorator.
2017-10-28 08:57:49 -07:00
neiljp (Neil Pilgrim)
5c3af83229
mypy: Improve return type of api_key_only_webhook_view decorator.
2017-10-28 08:57:49 -07:00
neiljp (Neil Pilgrim)
c063ba72a2
mypy: Improve typing of cache_with_key and cache decorators.
...
Fixes #1348 .
2017-10-28 08:57:49 -07:00
Tim Abbott
2e69d4d420
mypy: Fix type for per_request_display_recipient_cache.
2017-10-28 08:57:49 -07:00
Tim Abbott
fa55d7ed33
retry_event: Remove requirement of failed_tries being already there.
...
This fixes a bug where retries in the signups queue threw an exception.
2017-10-27 18:15:53 -07:00
rht
8b6b4e043f
install: Add option to get certs via certbot.
...
While this doesn't quite complete our plans for certbot support (it's
not documented, etc.), this is a great stride forward.
2017-10-27 17:19:34 -07:00
Catherine Kleimeier
fe2adeeee1
hotkeys: Fix ESC removing message feed focus in Firefox.
...
We correct a bug on Firefox where using the ESC key to close an edit
box that was opened by the left arrow key caused the message feed to
lose focus, making it difficult to navigate the message feed by
keyboard afterwards.
We fix this bug by changing the function that handles the ESC key
during an edit to pass the correct object to the message_edit.end
function.
Fixes #7072 .
2017-10-27 17:11:12 -07:00
Tim Abbott
0d1194811f
mypy: Remove ignores for a few typeshed bugs fixed upstream.
2017-10-27 17:09:00 -07:00
Tim Abbott
bfa148ab39
requirements: Update mypy to latest version.
...
This involves fixing the mypy annotations in one file
2017-10-27 17:05:52 -07:00
Vishnu Ks
e102c42e0f
requirements: Upgrade moto to 1.1.24.
2017-10-27 16:56:15 -07:00
Vishnu Ks
43dd26cf08
requirements: Upgrade Twisted to 17.9.0.
2017-10-27 16:56:15 -07:00
Vishnu Ks
ea58830673
requirements: Upgrade Sphinx to 1.6.5.
2017-10-27 16:56:15 -07:00