Commit Graph

750 Commits

Author SHA1 Message Date
Waseem Daher c16651bf23 [schema] Add referral system
For now, we just get emails about referrals that we have to follow up
on manually.

I don't love using the name "referral" in some places and "invite" in
others, but we already use the verb "invite" to mean something else
and "invite" is a canonical noun.

(imported from commit 0814c18395952fcdef234c1584984f71ca1b6f37)
2013-08-05 17:14:51 -04:00
Jessica McKellar d1ec806d3e Move the backend restriction on CUSTOMER4 name changes to json_change_settings.
That way do_change_full_name can still be used on CUSTOMER4
students internally.

(imported from commit dd8ba92372b85511d39e7dfb368d5f8c559f0652)
2013-08-05 10:56:06 -04:00
Jessica McKellar 118a2075d9 Allow anyone to register for the CUSTOMER3 realm through a special URL.
(imported from commit 8857d0217893f51fdba6585aea2fa79270161beb)
2013-08-04 19:55:00 -04:00
Steve Howell 6b9b33f769 Use PATCH again for patching bots.
This reverts a prior commit, but the earlier commit is fine
functionally; the earlier commit was a temporary measure.

Revert "Use POST, not PATCH, for patching bots."

This reverts commit c3146b23d5d7d134c2b80507eb87033ca375a4db.

(imported from commit ebfcb2bae72c11767f9750412440d40b7a2a4995)
2013-08-02 11:46:11 -04:00
Tim Abbott 802b3dc3b2 Add API endpoint to render some message content without sending a message.
(imported from commit e1604b3bf4fc65e958db22f280eba1b5d2ba1e90)
2013-08-01 14:01:58 -04:00
Steve Howell f7ca0117e6 Allow users to upload new avatars for their bots.
(imported from commit 9d7895a658740815f454c8bba400d7cff821b7f9)
2013-08-01 11:05:40 -04:00
Steve Howell ab23c534b9 Use POST, not PATCH, for patching bots.
This is a temporary expedient measure to work around our
PATCH not supporting file uploads in our current Django setup.

(imported from commit c3146b23d5d7d134c2b80507eb87033ca375a4db)
2013-08-01 11:05:39 -04:00
Zev Benjamin 905354f7a1 For mit.edu, include .d instances in narrowed views
(imported from commit 502b36d1a62f3f8f7b956c701fd10f580e1927d7)
2013-07-31 18:30:28 -04:00
Zev Benjamin a637fadd18 Fix regexes for MIT narrows that include un- and -.d streams
The previous regex didn't escape the period in '.d' and was doing a
case-sensitive match to find the base stream name.

(imported from commit 43ef13733987e50dcead06b7bd3e768cb4395998)
2013-07-31 18:30:28 -04:00
Tim Abbott d6acd8fce9 Add support for narrowing to a single message ID.
This is mostly useful for sending someone a link to a single Humbug
message.

(imported from commit b0994a2bf503c84690b13ce89bbcf5bab829bf0c)
2013-07-31 14:59:05 -04:00
Tim Abbott ed6f5ac470 Fix time travel by adding new near: operator.
(imported from commit 727a68016090164b586cbe59e692676a00e8cd3a)
2013-07-31 14:59:01 -04:00
Zev Benjamin 394deb4a72 Remove stray debugging 'print' statement
(imported from commit 261b3b6ee93ec596a1a971494761d92e7c27891d)
2013-07-30 18:29:33 -04:00
Tim Abbott 53e06a0bb5 Use rest_dispatch for accessing Tornado URLs.
(imported from commit f129f5e3dc9e83f40fa9ea1b95d97a9b9f5a6831)
2013-07-30 17:59:46 -04:00
Tim Abbott 438739f6cc More miscellaneous humbughq.com=>zulip.com updates.
(imported from commit 9a3dbc4268f251c2c0b20d8b6a7e1dc672f1b385)
2013-07-25 17:27:45 -04:00
Tim Abbott 3a1abc3ab0 Rename humbughq.com realm to zulip.com.
(imported from commit 6039719271be1e80fa7f80b9be851c8db7159f5e)
2013-07-25 17:19:18 -04:00
Tim Abbott c0a7e750c3 [manual] Rename notification bot to zulip.com domain.
Just before this is pushed to prod, we need to rename the Humbug
notification bot in the database using:

./manage.py change_user_email humbug+notifications@humbughq.com notification-bot@zulip.com
/etc/init.d/memcached restart

No action is required on pushing this to staging, but in between when
this is pushed to staging and when it is pushed to prod (and that
transition performed), notifying users that they were subscribed to a
new stream will not work on staging.

(imported from commit a0555527dec7b210022b09d9b1d13a7c910a8f9f)
2013-07-25 17:16:54 -04:00
Tim Abbott e085a804b9 [manual] Rename new user bot to zulip.com domain.
Just before this is pushed to prod, we need to rename the Humbug new
user bot in the database using:

./manage.py change_user_email humbug+signups@humbughq.com new-user-bot@zulip.com
/etc/init.d/memcached restart

No action is required on pushing this to staging, but in between when
this is pushed to staging and when it is pushed to prod (and that
transition performed), signup reporting to humbug will not work on
staging.

(imported from commit af2cd007b41ea885491f383442f211e8609fe5f9)
2013-07-25 17:16:54 -04:00
Waseem Daher 7689fa5fd4 Set reply-to on interest forms.
I often click "reply" and clear out the text to reply to these, and
it's sort of a pain to have to change the address.

(imported from commit ed8aae858bbd1821623cf640956ffccbacfaa1af)
2013-07-25 16:11:56 -04:00
Steve Howell df91b8c14e Lock down permissions for patching a bot, use do_change_full_name().
Sorry, there was some rebasing pain here.

(imported from commit 6f62a2882e5135e740d2f91fbc45cff81d20a5a5)
2013-07-25 13:00:11 -04:00
Steve Howell a393de2122 Support /bots/[email]/api_key/regenerate
(imported from commit 740ce4813969e45a4673b5419ba9e622acfa401d)
2013-07-25 12:41:52 -04:00
Steve Howell 25a8d5fadd Create back end for patching bots.
(imported from commit 189444d79bb7832b26f3e9c1b65da260122255bd)
2013-07-25 12:41:52 -04:00
Kevin Mehall eb6bc91c22 New Relic integration
(imported from commit a108f4c6e90d857263453036f6d5f09279302b7e)
2013-07-24 17:19:36 -04:00
Tim Abbott 4e1434b28d Use update_fields more consistently when modifying model objects.
(imported from commit a3f0c308b621b5ff85c55654f187e25749192b19)
2013-07-24 17:04:39 -04:00
Scott Feeney c234190bc0 Make stack trace annotation work
The code now unminifies all calls in the stack, including those outside
of app.js.

This requires the Python package sourcemap, recently added as a
dependency.

(imported from commit 550c73ad5bfe78a2c7169c11da0c95cbaac238d7)
2013-07-23 16:34:26 -04:00
Tim Abbott 18f94de07f Use standard functions for parsing/validating email addresses.
This adds two new functions for parsing out the domain and username
from an email address, and switches our backend to use them and
django.core.validators.valid_email() rather than custom parsing and
raw email.split("@").

(imported from commit 3d6e997d66908811eccb5f82f2f7fe349b40f238)
2013-07-18 13:58:16 -04:00
Tim Abbott bece588897 Include server deployment location and git commit in blueslip emails.
This should make it a bit easier to figure out exactly what was
running on the backend when an error happens.

(imported from commit d1002a92c24870b8d98d7133dff865eecf1cfffe)
2013-07-18 13:58:16 -04:00
Jessica McKellar 849b49b22d Make "subject" an alias for the "topic" operator.
(imported from commit 52c11ff48a286533906b99ed62839e6ae3e35b17)
2013-07-17 12:04:46 -04:00
Tim Abbott 8755fc05ca Move subscription_property state change code to actions.py.
(imported from commit 57056af4e4fe021fafa1d0d511a9c551cd53c74d)
2013-07-17 10:36:57 -04:00
Zev Benjamin eb93f20f95 On MIT, when narrowing to an unclass (or derivatives) also narrow to the base stream
Previously, narrowing to a stream also narrowed to
/^(un)*stream-name(.d)*$/, but not the other way around.

(imported from commit 6643f8d8306a737f4e96d473dd1fdbfdcd56e2a8)
2013-07-16 16:53:08 -04:00
Jessica McKellar 81f6052fd2 views: Switch from Humbug to Zulip in user-visible text.
(imported from commit 86a6d26c751f0953b2bab1f91a8b7046236921c6)
2013-07-15 17:38:04 -04:00
Leo Franchi e5b855d883 Add a bulk invite page for the first user in a realm
(imported from commit cf85c9d475209da4591e2f06f142008fb19ac9d5)
2013-07-12 13:07:02 -04:00
Leo Franchi bd837936ce Refactor json_invite_users into do_invite_users
(imported from commit 053274a1fcfbb93fba27d136b246b65b3491f549)
2013-07-12 13:07:02 -04:00
Scott Feeney ccec989036 Set page_params.staging on anything that isn't a prod deploy
Until now, page_params.staging has been dependent on whether DEBUG =
True. On your local server, page_params.staging is true unless you set
DEBUG to False to test minification, in which case, it's false. This
situation still counts as staging IMHO, and the new behavior will be
more useful for testing as well as consistent.

Quick reference chart:

Is page_params.staging true...  without this commit?    with this commit?
                                --------------------    -----------------
On a local server, DEBUG=True          Yes                    Yes
On a local server, DEBUG=False          No                    Yes
On staging                             Yes                    Yes
On production                           No                     No

(imported from commit 6ea960e7945844dde0fbedbe901062508312b051)
2013-07-12 11:33:16 -04:00
Steve Howell 97994ea7a9 Shorten private operator (private-message -> private).
(imported from commit f938bd56de05cc8fc0da18348d4dec8a18c96bb9)
2013-07-10 16:58:17 -04:00
Tim Abbott b8c40119a2 Don't 500 when users try to make their name super long.
(imported from commit 0c5e8baa421ed8cbff431bc5085ffe78b0a8fc1e)
2013-07-09 17:43:47 -04:00
Luke Faraone cfe9e268f4 Do not specify cascade=True in deactivate_user_backend.
This was mistakenly included from a previous iteration of the do_deactivate()
function's interface.

(imported from commit 0a6ddc5ba1dfe944f2cc0087c590046da6a73531)
2013-07-08 15:44:01 -07:00
Luke Faraone 2c83d015a9 Refactor bot deactivation view to cover all users and expose via REST
(imported from commit 9f7afb3b43ed14db0bb4217dbae4114846bb840b)
2013-07-08 18:00:28 -04:00
Luke Faraone b6cfb40140 Allow for rest_dispatch-backed webapp API calls
(imported from commit 7813f1911bda92f76921159ef67dd60de9ca6465)
2013-07-08 14:30:20 -04:00
Steve Howell 75ac44f9f3 Support deactivate_bot API.
(imported from commit 41eece8bf69a930e02eb4c0208cf25b5c283da16)
2013-07-05 14:09:32 -04:00
Tim Abbott 58536354ad Fix regexp for mit.edu narrowing.
(imported from commit 1f82671de8a00ac6fb0fc649ed3f85a8ceaa388f)
2013-07-03 18:34:01 -04:00
Luke Faraone 490020b441 Serve custom fonts to OS X desktop clients
Previously we added code which prevented us from serving custom fonts to
Humbug Desktop user agents due to concerns QtWebKit bugs with
@font-face.

On OS X, we use the system WebKit so we don't have this bug. In fact,
the aformentioned change caused us to have no custom fonts at all on Mac
systems!

Here we fix this by resuming the serving of such fonts to Macs.

(imported from commit b222e9dd721914d17aed8341244cfb5c71149a12)
2013-07-03 16:37:56 -04:00
Jessica McKellar 46afe3be69 views: remove now-unused tutorial message sending capabilities.
(imported from commit 65d14bf469f64b47cf682f4fb36946c6d841eebd)
2013-07-02 18:26:17 -04:00
Jessica McKellar 9a40276865 views: don't defer subscribing a new users to their streams until after the tutorial.
We did this as a hack to prevent traffic while you were in the
tutorial. In the revised tutorial, we want you to see your actual
streams while you go through it, and we'll instead store the events
client-side for processing after you finish.

(imported from commit 75af93d0661c9d14b2c85624aef3f71a78053980)
2013-07-02 18:26:16 -04:00
Leo Franchi 779ab0e3ca Get apply_markdown value from REQ if it exists
(imported from commit c93b0a96564535c0a0162e827a67379fdf166de9)
2013-07-02 15:04:42 -04:00
Leo Franchi 93765b0568 Keep variable in list comprehension from shadowing
(imported from commit 2d2bbc029d7c13b5e6f125bd5f79ba3d73d3c677)
2013-07-02 12:10:23 -04:00
Tim Abbott 74fd508b2f Remove subscriptions using bulk queries.
This improves the performance of unsubscribing to N streams by more
than a factor of 10 for large N.

(imported from commit a529e6d3ac4452f49c2294908d275280019bbd05)
2013-07-02 10:50:29 -04:00
Tim Abbott 703dec0344 Use bulk queries to get the recipients for narrowing to MIT streams.
Otherwise we could in theory make dozens or hundreds of
memcached/database queries to handle a narrow.

(imported from commit 232f38d8c005b9aef6f12f2f9a4d68a19134d038)
2013-07-02 10:50:29 -04:00
Jeff Arnold 45116a0b61 For mit.edu, include unclasses and .d classes in narrowed views
(imported from commit e21aab715c949d4348c447e6e135281b47e06b98)
2013-07-02 10:50:29 -04:00
Tim Abbott a4cf528fad Use a bulk query to fetch the streams in list_to_streams.
This substantially improves the performance of all the functions using
this helper.

(imported from commit 9c247e82f392475c8ddf46b4b498ef293911e9f5)
2013-07-02 10:50:29 -04:00
Tim Abbott a66bb508bb Use bulk queries for adding many subscriptions to a single user.
Previously we only used bulk queries when adding many users to a
single stream, resulting in very slow performance when subscribing
users to large numbers of streams (as happens when setting up a new
MIT realm user).

(imported from commit 849fa7b2a1a146c0a9adc1c727c20c9fbfb7b425)
2013-07-02 10:50:28 -04:00