zulip/zerver/lib
Tim Abbott f3af0fe635 reactions: Fix reacting to messages on streams you're not subscribed to.
We use the same strategy Zulip already uses for starred messages,
namely, creating a new UserMessage row with the "historical" flag set
(which basically means Zulip can ignore this row for most purposes
that use UserMessage rows).  The historical flag is ignored, however,
in determining which users' browsers to notify about new reactions,
and thus the user will get to see the reaction appear when they click
a message (and any reactions other users later add, as well!).

There's still something of a race here, in that if some users react to
a message while the user is looking at the unsubscribed stream but
before the user reacts to that message, those reactions will not be
displayed to that user (so counts will be a bit lower, or something).
This race feels small enough to ignore for now.

Fixes #3345.
2017-03-22 20:22:13 -07:00
..
bugdown bugdown: Remove trailing whitespace on fence code blocks. 2017-03-22 14:17:34 -07:00
url_preview mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
webhooks git.py: Add create branch event message. 2017-03-17 12:22:06 -07:00
__init__.py [manual] Rename Django app from zephyr to zerver. 2013-08-06 07:39:36 -04:00
actions.py reactions: Fix reacting to messages on streams you're not subscribed to. 2017-03-22 20:22:13 -07:00
alert_words.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
avatar.py Refactor: Change user_avatar_hash with user_avatar_path at all calls. 2017-03-04 18:39:49 -08:00
avatar_hash.py avatar: Move avatar data from email based to user id based. 2017-03-07 22:44:26 -08:00
bulk_create.py tutorial: Disable tutorial for default development users. 2017-03-22 15:30:36 -07:00
cache.py cache.py: Change realm_alert_words_cache_key to use Realm.string_id. 2017-03-13 14:17:14 -07:00
cache_helpers.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
camo.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
ccache.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
context_managers.py mypy: Change Generator[None, None, None] to Iterator[None]. 2016-11-27 10:42:16 -08:00
create_user.py tutorial: Disable tutorial for default development users. 2017-03-22 15:30:36 -07:00
db.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
debug.py mypy: Fix several Optional typing errors. 2017-02-10 23:53:44 -08:00
digest.py js dependencies: Change hashchange_encode to hash_util_encode in zerver. 2017-03-18 20:40:34 -07:00
domains.py Add stricter domain validation and improve error messages. 2017-01-26 17:24:25 -08:00
email_mirror.py mypy: Fix some new errors flagged by latest mypy master. 2017-03-19 21:03:45 -07:00
emoji.py bugdown: Change rendered emoji image to `unicode/<codepoint>.png.` 2017-02-26 18:30:15 -08:00
error_notify.py errors: Move do_report_error into zerver/lib/. 2017-01-23 23:18:28 -08:00
events.py Add realm-level settings to control inline image and url preview. 2017-03-21 15:46:17 -07:00
export.py Change if(realm.domain == zulip.com) checks to use Realm.string_id. 2017-03-13 14:17:14 -07:00
feedback.py feedback: Remove unnecessary realm_for_email. 2017-03-06 00:01:58 -08:00
html_diff.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
i18n.py Fix several new errors caught by mypy 0.501. 2017-03-03 14:12:52 -08:00
initial_password.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
integrations.py gogs: Add webhook integration. 2017-03-17 12:22:06 -07:00
logging_util.py logging_util: Fix timezone-naive datetime being compared to aware datetime. 2017-03-22 12:51:58 -07:00
mandrill_client.py Remove extra new lines at the ends of Zulip authoried files. 2016-09-26 21:05:24 -07:00
mention.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
message.py message.py: Delete unused function. 2017-03-18 16:08:36 -07:00
migrate.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
name_restrictions.py name_restrictions: Add a few more reserved subdomains. 2016-12-26 14:59:09 -08:00
narrow.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
notifications.py js dependencies: Change hashchange_encode to hash_util_encode in zerver. 2017-03-18 20:40:34 -07:00
parallel.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
push_notifications.py remove_push_device_token: Remove unused request argument. 2017-03-05 22:01:28 -08:00
queue.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
rate_limiter.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
realm_icon.py realm_icon: Use string_id instead of domain for Realm gravitar. 2017-03-13 14:28:43 -07:00
redis_utils.py settings: Add support for specifying a remote redis password. 2016-08-11 16:54:22 -07:00
request.py request: Fix unnecessary translation tag for assertion. 2017-03-09 00:38:14 -08:00
request.pyi mypy: Fix missing class in request.pyi and document. 2016-12-28 09:37:28 -08:00
response.py coverage: bring zerver/lib/response.py to 100% coverage. 2017-03-05 00:53:26 -08:00
rest.py coverage: Add test for REST requests to /json API unauthed. 2017-03-05 00:53:27 -08:00
retention.py retention.py: Remove use of domain from get_expired_messages. 2017-03-14 17:17:42 -07:00
sessions.py sessions: Fix missing typing imports. 2017-03-08 03:00:05 -08:00
sqlalchemy_utils.py mypy: Remove a bunch of now-unnecessary type: ignore annotations. 2016-10-17 11:48:34 -07:00
statistics.py lint: Clean up E126 PEP-8 rule. 2017-01-23 22:06:13 -08:00
str_utils.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
streams.py streams: Consider stream name validation logic. 2017-01-29 22:07:14 -08:00
test_classes.py testing: Flush API_KEYS before every test. 2017-03-22 12:07:06 -07:00
test_fixtures.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
test_helpers.py test_helpers: Remove unused message_ids function. 2017-03-18 19:22:49 -07:00
test_runner.py testing: Flush API_KEYS before every test. 2017-03-22 12:07:06 -07:00
tex.py markdown: Add TeX typesetting support. 2017-03-21 16:40:00 -07:00
timeout.py Replace 'type' with 'Type[BaseException]'. 2017-02-06 22:34:01 -08:00
timestamp.py Clean up timestamps.py and add a test. 2017-03-01 23:03:56 -08:00
timezone.py Add timezone field in UserProfile. 2017-03-15 11:18:24 -07:00
type_debug.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
unminify.py mypy: Convert zerver/lib to use typing.Text. 2016-12-25 10:33:45 -08:00
upload.py avatar: Fix buggy avatar URL scheme with S3 backend. 2017-03-21 16:12:04 -07:00
user_agent.py Add type annotation to mention.py, redis_utils.py, timestamp.py, user_agent.py 2016-06-03 19:00:16 -07:00
users.py users: Verify full names explicitly in user creation. 2017-02-07 19:54:30 -08:00
utils.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
validator.py mypy: Fix several Optional typing errors. 2017-02-10 23:53:44 -08:00