Commit Graph

264 Commits

Author SHA1 Message Date
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
Leo Franchi 5441409044 Consolidate emoji tests and test on frontend as well
(imported from commit 3244a93209b56b655b80633713a3f58ae46d06ff)
2014-01-27 12:07:48 -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 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
Steve Howell 1d95812770 Add is_admin to page_params.
Because full_name and is_admin changes go through many similar,
generic codepaths, it is almost more work at this point to keep
is_admin out of page_params as it is to just put it in.  So
I put it in.  This should pave the path for showing admins in
the GUI.

This commit actually starting by my adding a test
that calling apply_events() with the notification you get
when calling do_change_is_admin() updates
state['realm_users'] to be similar to what you would get
out of fetch_initial_state_data().  We didn't have test coverage
there before.  Making that test pass forced my hand to
either add is_admin to page_params or to special-case
apply_events() not to update page_params with is_admin.  I
chose the former approach.

(imported from commit 1e49d59c66540014284529c29d5007224be6a0c6)
2014-01-24 16:34:12 -05:00
Jason Michalski 1f98c4f4ce Add support for updating the stream description
The stream description can now be updated, but the UI is not yet updated
on success.

(imported from commit f45e0a9d5138d828ae98d6d49645ab3ddc966704)
2014-01-24 14:47:44 -05:00
Jason Michalski 1184a4f824 Update GetOldMessagesTest to get recipient ids from the database
The natural order of a query in bulk_create_streams will change when the
Stream model changes. We now query the database for the expected values
so the tests will continue to pass after schema changes.

(imported from commit 410739adde1077bf066df29a11544a627607481a)
2014-01-24 14:47:44 -05:00
Jessica McKellar c01c7285db Add a test for !modal_link.
(imported from commit fac5adf7d596eaca4ea8ed860ddaceb496e72c7a)
2014-01-23 17:06:29 -05:00
Leo Franchi aee127cdbe Share bugdown test data across frontend and backend tests
(imported from commit b278a60b5899cd336840e71d8e632e2b31338d82)
2014-01-23 16:50:29 -05:00
Jason Michalski 6d332151d2 Fix confusion of type_id and type in tests
test_successful_subscriptions_notifies_pm and
test_successful_subscriptions_notifies_stream were both asserting
type_id and not type with the Recipient.PERSONAL and Recipient.STREAM
values.

(imported from commit 26492f9c725c278ac81570a135dc9cc203213cbd)
2014-01-23 14:58:53 -05:00
Steve Howell 2283aa52cb Use "stream" as our type for updates to Stream.name.
(imported from commit 2eedbff5fac77b9e654ba88900167048573e4056)
2014-01-23 13:27:11 -05:00
Steve Howell bc6da3717f Fix obscure bug with page_params.is_bot.
If a name change event arrived during the call to
fetch_initial_state_data(), we would call apply_events() to
update the data structure that eventually becomes page_params.
Our update code, instead of surgically updating the fields, was
just overwriting the record, which led to is_bot being taken
out of the record when only full_name was in the event.

Apart from fixing the "update" case to do the right thing,
this commit also does a bit of cleanup on the code handling
"realm_user" events to make it more generic in how it does
add/remove/update.  If we could standardize our events a bit
more, this could eventually lead to DRYing up some of the
apply_events() code.

(imported from commit 772e2fcd6a5605ccb6e8d1bc499b5f336934cf3c)
2014-01-23 13:01:04 -05:00
Steve Howell 10533291e9 Clean up EventsRegisterTest.do_test().
Use var names hybrid_state, normal_state, and action, and DRY
up the calls to matcher/self.assertEqual.

(imported from commit 6e537e54a9ba85a4711311fdab0a3ba3db9de972)
2014-01-23 13:01:04 -05:00
acrefoot d8b15f4202 Improve Backend for Github integration
Refactor github webhook to handle multiple payload verions
split github fixtures into v1 and v2 versions

Group together all realm-specific logic. When v2 becomes available, we can
ask someone in each org to make the changes via the Github Hook configuration, and
slowly remove the special cases.

TODO: when our pull request for github-services gets merged, the integrations page
should say to look for Zulip instead of Humbug

(imported from commit 4790a730010b37186640f9996291afa6e8f96c2b)
2014-01-22 16:44:34 -05:00
Steve Howell 90ba39d02e Use do_change_is_admin() in the tests.
Call the action method instead of the lower level
assign_perm and remove_perm methods.

(imported from commit 8728fdb2ebfcfc0eacabfd242b229c32a27da2eb)
2014-01-22 14:43:29 -05:00
Steve Howell 3b12e63d8d Send notifications for is_admin changes.
(The client doesn't do anything with them yet.)

(imported from commit df2f406644fe271af53e32a6b3521752b6a1ac41)
2014-01-22 14:43:28 -05:00
Jason Michalski f05d817fb4 Fix building subscribe buttons for realms with a notification stream
Add a test sending new stream notifications to realms with a
notification stream and fix a bug in building the subscribe button
markdown.

(imported from commit 37985d8c0603ae206bef34b9522231c00bc8c572)
2014-01-22 13:08:41 -05:00
Jason Michalski c30a411c10 Add custom markdown tag to render a stream subscribe button
When new streams are created we now send a message with a custom
markdown tag that renders a subscribe button.

(imported from commit 9dfba280b3b4ff4f32f6431ef9227867c8bf4b40)
2014-01-22 11:28:31 -05:00
Steve Howell 6c6d1ee474 Use "synchronized" (past tense) in github webhook.
Normally github gives us a past tense version of the action, but
not for "synchronize," so we fix up the tense.

This also adds zerver.GithubHookTests.test_pull_request_synchronize

(imported from commit ef69467ed4a02dbfa94c8215fb9043b668d1dec9)
2014-01-21 18:18:24 -05:00
Steve Howell 3dbc7d3524 Fix "closers" of github issues/PRs in our webhook.
When folks closed issues or pull requests on github, we were
using the wrong field from the github payload.  Now we
correctly use the "sender" as the person doing the action.

(imported from commit 82989ab19b32f8e3f0bbff9b305a7cb2673d99e9)
2014-01-17 17:48:13 -05:00
Jason Michalski 4c90392261 [schema] Add an per-user option to disable notification on new streams
Added a default_desktop_notifications boolean to userprofile with a UI
in Zulip Labs. This flag is used to default the notification flag on new
subscriptions.

(imported from commit a25223cc5ecf09980cf877991e25034bb3fd4046)
2014-01-16 20:13:34 -05:00
Leo Franchi 607274c0ba Show who updated a ticket in pivotal integration
(imported from commit 005f71222d23f424b57fb84c9f20778836157a51)
2014-01-17 10:32:35 -05:00
Steve Howell 8bf9068d0b Add back end support to restrict creation of streams.
Note that this doesn't actually restrict anybody yet, but it
makes it so that UserProfile.can_create_streams must return True
for a user to create a stream.  We can modify that in the future
to have special behavior for realms that want more restrictions.

(imported from commit 432e85b1ca86aaee4a6bd1d4a6d0b2c78ecb0863)
2014-01-16 14:43:56 -05:00
Steve Howell fd5fd7e61b Have /json/users return is_admin flag.
(imported from commit 49b5c621510c47656f92c38bc5b9b1b6381d5c21)
2014-01-16 13:41:53 -05:00
Steve Howell e837f8bf8b Add back end for admins to assign/remove admin.
Add back end for admins to assign/remove admin permissions for other users.
The /json/users/<email> endpoint allows you to PATCH is_admin.

(imported from commit bb5e6d44d759274cc2a7cb27e479ae96b2f271b5)
2014-01-16 13:41:53 -05:00
Zev Benjamin f015d27d31 Disable historical search whenever the 'is' operator is present
Previously we only disabled it for 'is:starred'.  This caused a backtrace when
someone searched for, say 'stream:test is:mentioned', because we weren't joining
on zerver_usermessage, which meant the flag wasn't available to filter on.

(imported from commit ba19f8a74b21d60b89dfc8dbe9c8458ed86b423b)
2014-01-15 16:07:20 -05:00
Zev Benjamin d8d1d6ea40 Fix narrowing to PMs with yourself
(imported from commit 1326fa7ae779ba6476165e8838e46ce1323e3ecb)
2014-01-15 16:07:19 -05:00
Jason Michalski 60f878b45e Limit cross-realm private messages to zulip.com users
Cross-realm private messages are only used to respond to support
requests. So now cross-realm private messages are only allowed if
exactly two realms are in the private message and one of them is
zulip.com.

(imported from commit f01a2824e214682acb22a6995714a9d1b0d0c66f)
2014-01-15 16:07:19 -05:00
Jason Michalski 4b86ef59f1 Added Zendesk webhook
Zendesk works a lot like desk.com, it has triggers which use targets.
The triggers have a user defined template. Targets can also have place
holders that are posted, we add the ticket id and title here so we can
always construct the message subject.

(imported from commit 04e8e5c7c0fc5568201f252546f6ed42f282fd00)
2014-01-14 12:01:54 -05:00
Zev Benjamin 45ab625616 Add tests for get_old_messages DB queries
(imported from commit 1d6c871e6ac56324a129567e1ba447d44197a0aa)
2014-01-14 11:47:12 -05:00
Zev Benjamin db23674749 Do query time tracking at the psycopg2 level instead of the Django level
This allows us to track the query time of SQLAlchemy and raw queries.

(imported from commit 818a4ee41786ffc57b80d7ed1cfba075f29b6ee5)
2014-01-14 11:47:12 -05:00
Jessica McKellar 8976057b45 Add a backend test for signing up as the first user in a realm.
(imported from commit 637c28bfdcac2f021544e68bb125b85d759d9856)
2014-01-13 10:36:48 -05:00
Waseem Daher fe748f7633 Make Twitter preview look like other inline image previews.
(imported from commit ca4ff9146679a5348bf53d06e992972e9a4b628a)
2014-01-10 21:39:04 -05:00
Jason Michalski 9e822403bb Linkify twitter media links
Image and video links in the twitter API are media and need to be
handed on separately. We also include a preview image if the media link
is a to a picture.

(imported from commit 2bd00d267e51b29ad0ba681195b2bfea9b991d8c)
2014-01-10 21:39:02 -05:00
Jessica McKellar 5cd851ca4e Add a test for logging in with an invalid email address.
(imported from commit 7d6bc16909e3f3ccaaf218809af6b430c938a671)
2014-01-10 21:39:01 -05:00
Jason Michalski 1352dccea5 Add support to linkify links and mentions on twitter
This converts links in tweets to a tags. We also convert the displayed
text to the target of the twitter short URL. Mentions are linked to the
users twitter page.

(imported from commit 192d5546a7eea82759f9ae30d82c102aed15ff71)
2014-01-10 21:39:01 -05:00
Leo Franchi 45d3bb4f04 Update our pivotal integration to handle v5 of their API
(imported from commit 2deba4ed2f72c7d7ccedafbb8fc4370b2faa5490)
2014-01-10 21:39:00 -05:00
Jason Michalski 75d1366ae1 Fixes how user input is escaped in stream and topic regexes
NarrowBuilder.by_stream and NarrowBuilder.by_topic for mit users uses a
regex to search by stream and topic. Python's re.escape escapes unicode
in a format that postgres can not parse. We escape unicode as '\uXXXX'
for postgres.

(imported from commit d2c27d4514c31fdc6ef1fea898fe721a6f0ab069)
2014-01-10 21:38:59 -05:00
Steve Howell 7f668463ac Add an ZulipiOS tab to /activity.
(imported from commit 09f609e340a8fb7838e74d558eb3e397ea5f1f7b)
2014-01-10 21:38:57 -05:00
Steve Howell 0b9eb74f93 Remove Pure API tab from /activity.
(imported from commit 32ec22de7746637a18c98f93903661851e367bc8)
2014-01-10 21:38:57 -05:00
Jessica McKellar 0e120c9bbf Show users in deactivated realms an error page when they try to log in.
(imported from commit 6de839ae944b8c76715361c2211cd759d78f4f1a)
2014-01-07 20:24:21 -05:00
Jessica McKellar 32549ec135 Show new users an error page when they try to sign up for a deactivated realm.
(imported from commit 1696a6a5d26ec92b881cd3fda43e6b262e2fbfa5)
2014-01-07 20:24:21 -05:00
Tim Abbott e0c9397c62 Fix query count for test_bulk_message_fetching.
(imported from commit 1f5aaa05aa97e3c07688b8f91b4b45ca39dcc614)
2014-01-07 17:59:56 -05:00
Leo Franchi c7836626ea Accept a pass-through local_id option in send_message
(imported from commit 3f7b8e862a92d8a11b68da9ff23f711b6b25b5e2)
2014-01-07 17:33:34 -05:00
Leo Franchi 76892c52aa Send realm filters to clients
(imported from commit a3ba31701baa4d515ea3bf36c39d7255f1dd20d6)
2014-01-07 17:33:33 -05:00
Jason Michalski 175d47f104 Added tests for the rename_stream api
Two tests were added.

1) That that name of the stream is changed.
2) That realm admin is required.

(imported from commit f8fd482c653c983182b96d53c30d731e272f96cd)
2014-01-07 17:15:43 -05:00
Jason Michalski 9d7ee674c6 Add tests for deactivate_stream_backend
deactivate_stream_backend was untested now we test

1) That subscriptions are removed
2) That the realm admin is required

(imported from commit eedb1c4fc0e363df58721302e9f8fbedf78389a9)
2014-01-07 17:15:43 -05:00
Steve Howell 654ce3e0c7 Add make_stream_private endpoint.
(imported from commit b504c24fd651ecf8814e64725a9f303dc085b14e)
2014-01-06 11:59:47 -05:00
Steve Howell e0c62c5eda Add make_stream_public endpoint.
(imported from commit 03d4cff5587d0aa149997f2f6ae28ec4ede95d7a)
2014-01-06 11:59:47 -05:00
Steve Howell 5dc3d9abce Log internal queries if they are >= 5s.
(imported from commit ee88fcd6292a177e02bfe5e5bca5480b0e474030)
2013-12-26 09:23:18 -05:00
Steve Howell eb6868704f Give higher threshold for webathena kerberos queries.
These are mostly out of our control, so they are not very actionable.

(imported from commit ef342ec1edbff0fa1a934413a7f19ed14817a502)
2013-12-26 09:20:59 -05:00
Steve Howell f61740551c Bump slow query threshold to 1.2s
(imported from commit 8d97fc22d208274bc57b884828957dacf396348a)
2013-12-26 09:16:49 -05:00
Steve Howell e0a1841b1c Extract middleware.is_slow_query() and add tests.
(imported from commit 60902244a420800f558fdf2f1c38b4ed736c1286)
2013-12-26 09:09:15 -05:00
Tim Abbott e77b34ed82 api: Extract client strings from UserAgent.
(imported from commit 22468dd0eb06bb52ed7273f3067ae3e2461ee0a5)
2013-12-19 17:20:43 -05:00
Tim Abbott 8c8c5337ef UserPresenceTests: Fix use of API auth with json view.
While it does work, it's more an accident than intentional behavior
and not something we want to be encouraging (and it's messier code).

(imported from commit 3797147fc21836135a6304412bd3f958873a0576)
2013-12-19 17:20:43 -05:00
Steve Howell 7cded2a956 Show realm history on the main activity page.
This shows the number of messages sent by humans for the last
eight 24-hour periods, for each realm.  "Messages sent" isn't a
perfect metric of activity, but it's easier to query with our
current data model than certain other statistics.

(imported from commit 9de3c479640a0b9dbc017b245dda21d951f4efa4)
2013-12-18 16:01:44 -05:00
Steve Howell 6f573feaeb Add "length" option to check_list validator.
(imported from commit 4f8e203f964d1c936fe548b2f77a2e4aae745ae9)
2013-12-18 12:45:29 -05:00
Steve Howell e7a42ffd02 Add test for /json/set_alert_words.
(imported from commit 307d87331870a89713030e8178b1aa14a31cfdfd)
2013-12-18 12:45:28 -05:00
Steve Howell 94e3c02649 Add test_bulk_invite_users().
(imported from commit bc8ab756dae0fd82e73b5b2a9655974c5fc839b0)
2013-12-17 16:24:59 -05:00
Steve Howell bfb54b5a4d Add validator support to REQ and has_request_variables.
Validators are similar to converters, but they don't have
to parse JSON, and they are told the name of the request
variable to help format error messages.

(imported from commit 3c33e301892519c67e70675006d5686d9f013353)
2013-12-13 18:19:10 -05:00
Steve Howell 60917c83d6 Add test_REQ_converter.
(imported from commit 4425c68a532dc8a6db3b76397156c4e9d92a5b44)
2013-12-13 18:19:10 -05:00
Steve Howell 668c0ab529 Validate principals in add_subscriptions_backend.
Make sure that principles is a list a of strings (unless it
is None).  This includes a unit test.

(imported from commit c2e3f1c0cafc207ceca67d5a174ef4e29a32c6ca)
2013-12-13 18:19:10 -05:00
Steve Howell 0cdcf102a0 Validate parameters in update_subscriptions_backend.
w/unit tests added

(imported from commit a0c0d779279b35ffc5bf1fbe4c5c5a25af263c10)
2013-12-13 18:19:08 -05:00
Steve Howell 6b70e9ddb7 Add SubscriptionRestApiTest.test_basic_add_delete.
(imported from commit 735d6a0657952790de1d58c62cc983320ec402e8)
2013-12-13 18:19:08 -05:00
Steve Howell 4184b9d56f Add validators.py (with tests).
This sets up a scheme to validate complex data structures and
give specific error messages for improperly typed parameters.

(imported from commit 33b2f070d993da4ee929119dd41503bd0128c8eb)
2013-12-13 18:19:07 -05:00
Waseem Daher 14a5c6bf66 twitter: Detect link styles more robustly.
* Deal with shorter tweet IDs
  (some old tweets don't have a full 18-character ID)
* Allow trailing slash
* Deal with old-style #! syntax
* Deal with links that link to a photo

(imported from commit 008a98c806f3b8dddd9e2f18a8f002af6932766f)
2013-12-13 18:13:23 -05:00
Kevin Mehall ebab4a59c9 Don't proxy https images through Camo on MIT
These images at least load now, but that's because Camo redirects
the browser to the origin server, so the only effect is an extra
round-trip time.

(imported from commit 0d6b9c888a5cdfaa9299272d74a085e872dfa434)
2013-12-13 17:27:01 -05:00
acrefoot 1bd420f12c Show auto-scroll forever setting in /#settings
(imported from commit fa66cbe52836f230e551f25c47bd755b705387d2)
2013-12-13 11:50:11 -05:00
Tim Abbott 2e62cd5a74 Add tests for the events_register event application system.
(imported from commit 6c3dbe55d43f528b6a980bba3598ac30c0307a69)
2013-12-12 17:36:41 -05:00
Tim Abbott 71ad82b6aa Add support for event queues with an included narrow.
This will allow us to substantially decrease the server-side work that
we do to support our Mirroring systems (since the personal mirrors can
request only messages that user sent) and also is what we need to
support a single-stream Zulip widget that we embed in webpages.

(imported from commit 055f2e9a523920719815181f8fdb44d3384e4a34)
2013-12-12 17:36:39 -05:00
Tim Abbott bd977e9e5c Add a basic test for the get_events API backend.
(imported from commit 6f5351947f2b30f13c3309720c8c7c2187d16d51)
2013-12-12 17:36:38 -05:00
Tim Abbott 0a7c6ac261 Remove legacy /api/v1/update_pointer endpoint.
(imported from commit 4e2d111cf00ab2064291b282795c4b89835d1c17)
2013-12-12 10:31:05 -05:00
Tim Abbott 0c79465950 Remove legacy /api/v1/get_profile endpoint.
(imported from commit c8e78be4c8549022556099cc13342627323c0b01)
2013-12-12 10:31:05 -05:00
Tim Abbott 01428e5076 Remove legacy /api/v1/get_old_messages endpoint.
(imported from commit 2ca426f08f9f862e756a1fda55bb2764997aeb76)
2013-12-12 10:31:04 -05:00
Tim Abbott 795f716daf Remove legacy /api/v1/get_public_streams endpoint.
(imported from commit 49db0232e7f655308847f3ccef2b73368ab9b774)
2013-12-12 10:31:04 -05:00
Tim Abbott 2f1382d0b8 Change test names in running printout to be what test-backend takes.
(imported from commit 330aa6ca4ad5f8ebfe30042039d4a04d78f1691f)
2013-12-12 10:31:04 -05:00
Tim Abbott 0a952b1a66 Fix abuse of bugging login behavior with API URLs.
(imported from commit 3009cd094dff8891da415e1bfcf596ea6cb38abc)
2013-12-12 10:31:04 -05:00
Tim Abbott 33cdf0d019 Remove obsolete /api/v1/subscriptions/add endpoint.
(imported from commit 838e3a29219acf157f16258a46b0719d97ae46de)
2013-12-12 10:31:04 -05:00
Tim Abbott 664270a1c4 tests: Add put/delete helpers to avoid manually urlencoding.
(imported from commit 120b564b27ffd711e0f4e63279971433fb4aaa9b)
2013-12-12 10:31:04 -05:00
Tim Abbott 752e7aa84a Remove obsolete /api/v1/subscriptions/remove endpoint.
(imported from commit 9fc6bdb4cc288aa7499399d1d281fb752ea3a52e)
2013-12-12 10:31:03 -05:00
Tim Abbott 23a3b078d6 Remove legacy /api/v1/get_subscribers endpoint.
(imported from commit 52ab7b1200c2a62d1f8c251ab8d2f187cd2eb50b)
2013-12-12 10:31:03 -05:00
Tim Abbott cacd60860a Remove legacy /api/v1/subscriptions/list endpoint.
(imported from commit 457ceec760488815a24b5695362a42f4a94aabdc)
2013-12-12 10:31:03 -05:00
Tim Abbott b10278c8e0 events: Fix incorrectly empty event queues with virtual events.
I'm not sure this had much impact, but it's definitely a subtle bug.

(imported from commit 0260d4c5c35ce8eac683e84f1d939a6704ce4e2b)
2013-12-11 16:59:48 -05:00
Kevin Mehall 662edc2558 [manual] Backend support for Android GCM push notifications
This adds a dependency on gcmclient:
http://gcm-client.readthedocs.org/en/latest/gcmclient.html

pip install gcm-client

or

apt-get install python-gcm-client

(imported from commit 9f1fbf1f793e4a27baed85c6f1aa7a7b03106a10)
2013-12-11 15:37:48 -05:00
Leo Franchi 2c39e28ff6 Use realm filters from the database in bugdown
(imported from commit 8e12bfb1b1fe9cad694f80a189efa64b0f102e81)
2013-12-11 14:39:10 -05:00
Leo Franchi 1e7a22f14e Replace other non-zerver uses of iPhone client
(imported from commit 0988e2c9bd0499a0711daed97f89aa672776f085)
2013-12-03 14:35:24 -05:00
Tim Abbott abded5f886 Upgrade event flag collapsing to support all flag changes.
(imported from commit a2ca74b779d67148aee41e92e4a4cb716620e566)
2013-12-03 12:21:04 -05:00
Tim Abbott d2486670a8 event: Add deduplication of server restart events.
(imported from commit e464aa8b68958fb9f9fe8c199b9e73df510d22bc)
2013-12-03 12:20:36 -05:00
Tim Abbott 0156e72352 Add tests for our event queues data structure.
(imported from commit 5c00251998d25cf2283737173e5af0b26ccbdad4)
2013-12-03 12:20:28 -05:00
Jessica McKellar 11d5f8bbc5 Add a test for unsubscribing from digest emails.
(imported from commit 145c25ae99cf66b9a447b2e3a44a3b7344dc9f59)
2013-12-02 18:58:04 -05:00
Tim Abbott 2a0c2207d2 Revert "Add tests for our event queues data structure."
This reverts commit 5be116d6cc983edaac240e83d1b950faa08d164c.

(imported from commit bc47f42235e9800906270a5776167f5ea001d9a2)
2013-12-02 11:03:04 -05:00
Tim Abbott 5b601d8492 Revert "event: Add deduplication of server restart events."
This reverts commit 05467929ba376a0ce173119c5d90d83671fc544b.

(imported from commit 4f24a0f1fe72e71fa368e1d818d9406a76c131be)
2013-12-02 11:03:04 -05:00
Tim Abbott 2c2f404cb6 Revert "Upgrade event flag collapsing to support all flag changes."
This reverts commit dadf3852f2ca7aaa85fb97b3d265c990b4e5a38a.

(imported from commit de5a95572aa955b4a9419b80a99d2446c51730e7)
2013-12-02 11:03:04 -05:00
Jessica McKellar 848c9ec7be Add a test for unsubscribing from welcome emails.
(imported from commit c206bd9283e6be22b285abd583c6e80719260448)
2013-11-27 09:30:00 -05:00
Tim Abbott e9f4612281 Upgrade event flag collapsing to support all flag changes.
(imported from commit dadf3852f2ca7aaa85fb97b3d265c990b4e5a38a)
2013-11-26 18:12:52 -05:00
Tim Abbott fb5c42707e event: Add deduplication of server restart events.
(imported from commit 05467929ba376a0ce173119c5d90d83671fc544b)
2013-11-26 18:12:52 -05:00
Tim Abbott 5a4df81202 Add tests for our event queues data structure.
(imported from commit 5be116d6cc983edaac240e83d1b950faa08d164c)
2013-11-26 18:12:52 -05:00
Leo Franchi 501f063426 Replace email_to_domain with split_email_to_domain and resolve_email_to_domain
Now that we support email aliases, we have to be careful when going from
an email address to a domain that we assume we can use to get a Realm
object for. When we care about the Realm's domain, we want to follow
any RealmAliases that exist for a certain domain.

When we just care about the original email address domain itself,
for comparison or other purposes, use split_email_from_domain

This removes the ambiguity of having to decide when to use
email_to_domain + RealmAlias or just email_to_domain

(imported from commit 0e199495502d946ce2e1aae56263e7e8665be4ed)
2013-11-26 10:45:01 -05:00