Steve Howell
dbc1172a20
Extract update_user_profile_caches().
...
This function updates all the user_profile-related caches
that are keyed on a per-user basis.
(This had some test coverage already.)
(imported from commit 37979400514a7b46a6dcb7e36665b0fee2f3c525)
2014-01-28 17:40:00 -05:00
Steve Howell
3776d11c3a
Rename update_user_profile_cache() to flush_user_profile().
...
(imported from commit 1fddb8b8dfe7943ace70c51d762eeae2ee1203a0)
2014-01-28 17:40:00 -05:00
Steve Howell
aca5586cc0
Fix command line help for ./manage.py show_admins
...
(imported from commit d5de8832214db7b8a754f155b225e706b655260b)
2014-01-28 17:40:00 -05:00
Leo Franchi
e716a75d22
Properly render at-all and at-everyone mentions locally
...
(imported from commit 9533b83dba6a61f6c09da755fca54e8a24ad61e6)
2014-01-28 17:37:10 -05:00
Leo Franchi
1666403850
Find message objects in any lists when updating, as update might come from server
...
(imported from commit fa70180c9a228bff39efd846d465d0f1fa9bb4e7)
2014-01-28 17:31:02 -05:00
Jason Michalski
05e00575bb
Only send stream update events to clients that need them
...
Stream name and descriptions updates were being sent to all of the
active users on a realm. They are now only send to users who would have
information about that stream.
(imported from commit 2621ee8029f7356bf44ec493d7b5361bd546a8f5)
2014-01-28 17:12:15 -05:00
Jason Michalski
c573efd437
Ignore stream description update events for unknown streams
...
Clients can receive description updates for streams which are not in
stream_data. We should ignore the updates and warn that this has
occurred.
(imported from commit 3cd5a98a133012ae27ea0f43b03cc9d8e459e49c)
2014-01-28 17:12:15 -05:00
Steve Howell
1dd674c7ae
Make import statements take less vertical space.
...
(imported from commit 4d5901491d6c8c21fe045ac9751bc80613f94a59)
2014-01-28 17:04:51 -05:00
Steve Howell
80af0b8134
Move AuthedTestCase to test_helpers.py
...
(imported from commit bdaf63c5ed4e8d7c19e9c19f79151e8e7885c53e)
2014-01-28 17:04:51 -05:00
Steve Howell
a8f2ecf48c
Move context managers to zerver/lib/test_helpers.py
...
(imported from commit f57678fcb68aecdbb70ad86cd02cc5441695aaf5)
2014-01-28 17:04:50 -05:00
Leo Franchi
91fb4f6b8c
Fix clicking on link to message when sending outside this narrow
...
(imported from commit 6eeeb3b4c06021be21f48c8c5f2869904cd13b09)
2014-01-28 16:03:11 -05:00
Leo Franchi
ffb816391c
Use our own fenced code preprocessor, fixing output mismatches
...
(imported from commit 3d4abb1043349e30adf265342ee7c946a99b3ce2)
2014-01-28 15:35:32 -05:00
Leo Franchi
420a7cab7a
[marked] Add preprocessors in marked and allow them to insert arbitrary HTML
...
(imported from commit 367418266f4fbe2d723212845f49f0d4356fab52)
2014-01-28 15:35:32 -05:00
Leo Franchi
daecc7993a
Add a fenced code parser in javascript
...
(imported from commit 42b1dc18ca34cbbdf3cda6e833adde631a9d88f5)
2014-01-28 15:35:32 -05:00
Leo Franchi
dd7d31c7a6
Allow an empty home view when unnarrowing
...
(imported from commit 69f1a84b23ae8942db58851a1a1c6723c26df560)
2014-01-28 15:35:31 -05:00
Steve Howell
8aaf1cf8c2
Add API for removing default streams from a realm.
...
(imported from commit 06433126e31b372dff8a23eb8bbea14515138c85)
2014-01-28 14:30:37 -05:00
Steve Howell
af9a1e967f
Add API for adding default streams to a realm.
...
(imported from commit 0f48f722dd618c0d054aafdf3d931ef014a5c3ee)
2014-01-28 14:30:02 -05:00
Steve Howell
4cf677eb6d
Add do_remove_default_stream().
...
(imported from commit 559dcd93ca43f4ffba58119fe429df3f6843fd63)
2014-01-28 14:28:51 -05:00
Steve Howell
38668adcec
Extract DefaultStreamTest.get_default_stream_names().
...
(imported from commit e51ca97ca820778c161e24f4309517fc5f991dda)
2014-01-28 14:28:51 -05:00
Steve Howell
4ed661ca71
Add do_add_default_stream().
...
(imported from commit 34c96bdc3f5c2f7f119d2efe1606316878d34d03)
2014-01-28 14:28:51 -05:00
Steve Howell
b5e0eb35be
Add test_set_default_streams().
...
(imported from commit 359132c6c31c6de7524df3e9f34dff22273a61bc)
2014-01-28 14:28:50 -05:00
Steve Howell
af00f4609a
Extract get_default_streams_for_realm().
...
(imported from commit 6ef41615eb660fd161bfd53de09fea56266ddd2d)
2014-01-28 14:28:50 -05:00
acrefoot
a126292431
Add github issues tracking to CMU's realm
...
(imported from commit 5f4f00888687d14ddf6977e6b2de188294e8e44f)
2014-01-28 13:56:14 -05:00
Tim Abbott
439959592f
Rename build_offline_notification_event to build_offline_notification.
...
(imported from commit 88f4e35847faae999d72e804c9dc4d01ce51889f)
2014-01-28 13:42:50 -05:00
Tim Abbott
3fddc11cc2
Process message events more similarly to how other events are handled.
...
(imported from commit 5ebcd7a10fe54a8ecafb9550348a1e0418d4cbda)
2014-01-28 13:42:50 -05:00
Tim Abbott
934ac3fc88
Rename local variables inside process_new_message.
...
For greater clarity and in preparation for making message events be
processed more like how we process other events, we are changing:
data => event_template (for the input event we're processing)
event => user_event (for the event sent to a user's clients)
event => notice (for the missedmessage notifications)
(imported from commit 30c76c3588ebe2ac44e27e17a39df4a1403979cb)
2014-01-28 13:42:44 -05:00
Tim Abbott
1a90d50a1f
Clean up parsing in process_event and friends.
...
(imported from commit 408f9171fa481fa678dd6e27ea4cc610add232d5)
2014-01-28 11:01:30 -05:00
Tim Abbott
1cc3a6a903
Switch update_message to a generic event type.
...
(imported from commit db3c4d2326727ca05d25ab43ebc061d3e5cd0630)
2014-01-28 11:01:30 -05:00
Tim Abbott
167b883c38
Clean up the update_pointer tornado notification code path.
...
(imported from commit 94997dea54e6cc8e5b5a314a95d6114773462608)
2014-01-28 11:01:30 -05:00
Tim Abbott
0507b1bb06
Split out do_update_pointer from update_pointer_backend.
...
(imported from commit 25da1b324a9170677b0f6fc2e29841d6f2af9dec)
2014-01-28 11:01:29 -05:00
Tim Abbott
5ccb8b1bea
Add tornado_callbacks.send_event with clean API for sending events.
...
(imported from commit 07209a1744ac9372273858a3e69e8a2fd9e06e06)
2014-01-28 11:01:29 -05:00
Tim Abbott
98e4d7aeb3
tests: Change tornado event capture code to a better hook.
...
(imported from commit b3ef0ba2108ea8d6d7df31cab72b43a10bdeab93)
2014-01-28 11:01:29 -05:00
Tim Abbott
01dedb67f4
tests: Add assert_length helper function for query count asserts.
...
This way, when one of these asserts fails, the relevant failure will
be printed so that we can look at it.
(imported from commit c0dfe602b987174d151981c083c66fdfdeb01253)
2014-01-28 11:01:29 -05:00
Tim Abbott
bf0b0e24f2
Transition code for the Tornado message format changes.
...
(imported from commit 0f4a38db07517068d503f7a295c0c58ea4a02cdf)
2014-01-28 11:01:29 -05:00
Tim Abbott
3bcba79e77
Send message data to Tornado via rabbitmq instead of memcached.
...
This is a lot simpler and eliminates a possible failure mode in the
data transfer path.
(imported from commit 19308d2715bbd12dc9385234f1d9156f91bdfae0)
2014-01-28 11:01:29 -05:00
Jessica McKellar
fd3fc095b5
freshdesk: allow subject field to be empty.
...
The field should still be present, but Freshdesk now lets it be empty.
(imported from commit a317043947ecb6e234efabaaf6967ebe35e154a8)
2014-01-27 21:50:00 -05:00
acrefoot
07344bb283
Fix github hook when receiving commit_comments
...
Apparently (according to our error logs) it's possible for there to be a "position" but no "line" [number]
on a commit comment. According to the docs, line numbers are deprecated, although they're probably
more useful than diff line number (aka 'position').
(imported from commit d48f9efbe42293c9585442bd521b1843042eca65)
2014-01-27 16:39:40 -05:00
Leo Franchi
0917a27b79
Document realm filter regexp oddities
...
(imported from commit 987d8ea679f40c31f2fe2280b6d585f82b20e606)
2014-01-27 13:43:55 -05:00
Leo Franchi
dc3c6f34fc
Convert python-regex inline flag style to JS regex flags
...
(imported from commit 16c58fa54c0b87931d873290b175461ceb176d62)
2014-01-27 12:30:42 -05:00
Leo Franchi
b83be2cd32
Properly avoid realm filter work in non-local-echo case
...
(imported from commit 9c01109e6900509690841306fb4a23464321de61)
2014-01-27 12:30:42 -05:00
Leo Franchi
1fdb586c13
Make sure then_select_id is a number to call .toFixed()
...
(imported from commit 58635110c737ccb38e74cce8b4feb5d93dfbf5cc)
2014-01-27 12:30:42 -05:00
Leo Franchi
a82bc689e8
Render /me message on the frontend
...
(imported from commit ce4a44624b7084464d5c6ce8e04eef03ee23c9e3)
2014-01-27 12:30:42 -05:00
Leo Franchi
883157893c
Use a UserMessage flag to indicate /me messages
...
(imported from commit ea503b0d3eb6e90230c0859be96ede60faf5c2bd)
2014-01-27 12:07:48 -05:00
Leo Franchi
b119bf74ca
[third] Update marked.js to HEAD to pull in javascript escape fixes
...
(imported from commit f673746c7f2d424c56b3e0b5d028952f97fb2a57)
2014-01-27 12:07:48 -05:00
Leo Franchi
5441409044
Consolidate emoji tests and test on frontend as well
...
(imported from commit 3244a93209b56b655b80633713a3f58ae46d06ff)
2014-01-27 12:07:48 -05:00
Leo Franchi
78f0cc1c4d
Don't set realm filters unless we have local echo
...
(imported from commit bbb7d87a869d6f1bd99a45581f8f557a97f30cce)
2014-01-27 11:56:25 -05:00
Steve Howell
6fff91493c
Fix bug in apply_events() for removing subscribers.
...
To mutate the state for removing subscribers, the previous
code was essentially adding in event['subscriptions'] to
state['unsubscribed'], but that was a naive approach, since
the event object only has the name of the subscriber, and not
the full subscription info.
We instead effectively copy records over from state['subscriptions']
to state['unsubscribed'], and we also do surgery on the subscribers
that made me need to add the user_profile parameter to apply_events().
With the code apparently working now, I was able to remove the
match_except() test helper and use a more thorough matcher in
the test on do_remove_subscription().
Part of fixing the "remove" case was cleaning up the "add" case,
since they aren't quite symmetric opposites of each other, although
under this refactoring they now share the new name() helper.
(imported from commit 0deab67d0c7b08b3ad962493efae3762a835fd29)
2014-01-27 10:41:29 -05:00
Tim Abbott
6d64427c46
Fix email mirror.
...
(imported from commit 73c109db6e821b139203f662023ed780fcee0f24)
2014-01-24 18:11:20 -05:00
Tim Abbott
da90d63046
Split out zerver/lib/notifications.py from actions.py.
...
(imported from commit 784b82834ee4fcb4431e77f8fb1c526f8eec82ad)
2014-01-24 17:33:56 -05:00
Steve Howell
cf16d95437
Move some imports in tests.py to the top of the file.
...
(imported from commit 588c38cb94161092b517848839977d45325633b4)
2014-01-24 16:47:20 -05:00