Tim Abbott
1ea1cdcdfd
Call extract_recipients using a POST() decorator.
...
(imported from commit 135c465251a7af688b4354d0bd57763fd8ce282e)
2012-11-15 15:38:18 -05:00
Tim Abbott
03e52767ff
Don't lower-case recipient email addresses in extract_recipients.
...
(imported from commit 7dd150dae659cc68aa6c8f1bad39f7be32384a95)
2012-11-15 15:36:23 -05:00
Tim Abbott
5230382e4d
mirror: Check whether the user is a recipient by id.
...
(imported from commit e50f0b00d8e3cb00fdc7af3872b5adc38c432dcc)
2012-11-15 15:36:23 -05:00
Tim Abbott
4fe089e1ce
Refactor arguments to create_mirrored_message_users.
...
(imported from commit 1a0954018585514c391dd0a6d5d2d382cb8e37ab)
2012-11-15 15:31:48 -05:00
Tim Abbott
eddc516d5f
send_message: Allow list-form "to" for sending to streams.
...
(imported from commit f1d8c694b5d89d09222d4f303f68841aede64385)
2012-11-15 15:31:48 -05:00
Tim Abbott
18a6014fa3
send-message: Add sending to streams and some code cleanup.
...
(imported from commit 806b17bd959f643a7422f9fcf5d24d6f945a18c2)
2012-11-15 15:31:48 -05:00
Tim Abbott
5faf18754e
Decrease code duplication in create_mirrored_message_users.
...
(imported from commit d299124aa1eaa9afac62278c6b98208a14d2cdb1)
2012-11-15 15:30:09 -05:00
Tim Abbott
411a7f6b4f
[manual] send_message: Rename recipient/stream fields to 'to'.
...
This commit changes APIs and requires and update of all zephyr
mirroring bots to deploy properly.
(imported from commit 2672d2d07269379f7a865644aaeb6796d54183e1)
2012-11-15 15:30:06 -05:00
Tim Abbott
6f10d27f3b
send_message_backend: Eliminate unnecessary sender argument.
...
(imported from commit 64c1b9e2973e47a1d6af355cef0617c9abbff946)
2012-11-15 15:20:52 -05:00
Tim Abbott
b219be06d3
Use @has_request_variables for client_name extraction.
...
(imported from commit b2ba8edaa680c69c82258bfc3f93a9e8028f2cfa)
2012-11-15 15:20:52 -05:00
Tim Abbott
542f8695ad
Add 'try now' link when not receiving messages.
...
(imported from commit f52a376a62f2aed213d641e31a6f4c0380057d12)
2012-11-15 15:09:25 -05:00
Tim Abbott
9e7802cd51
check-mirroring: Use consistent ordering for keys.
...
(imported from commit 7deaf55ccb4b47a11dbd30c9239893a42eb39e00)
2012-11-15 14:56:10 -05:00
Tim Abbott
a11a4dceb7
zephyr_mirror: Improve error handling getting public streams list.
...
(imported from commit 06f9c00f19056bfe7db3c02955e3a29ad270de6e)
2012-11-15 14:51:05 -05:00
Tim Abbott
56c6d93e8a
zephyr_mirror: Send Humbugs in child processes.
...
This improves the throughput of mirroring a large number of zephyrs in
a row from about 1.5/second to about 9/second, which is basically
satisfactory.
(imported from commit 5f72680d6290eaa02ef8ced5b3792fb3efc1db41)
2012-11-15 14:50:59 -05:00
Zev Benjamin
4497ef1493
Basic API tests
...
These tests don't have the same coverage as the json test on the
theory that the backend is shared by the two views and that
differences are mostly on the way into the backend functions.
(imported from commit ddd21135565122dae8cbe90846d1aee7e4a2f56e)
2012-11-15 13:42:17 -05:00
Zev Benjamin
3bc47bc44a
Make @asynchronous's added 'handler' argument be keyword instead of positional
...
Adding a positional argument caused a problem when
@authenticated_api_view started using @has_request_variables
internally. The 'handler' argument used to be passed through
positionally to the wrapped function, but when using
@has_request_variables, the wrapper inside @authenticated_api_view
had to take additional arguments. The handler argument was then
assigned to one of those parameters instead of being passed through.
(imported from commit 66240bd465c803ddcbf4a603509051fca7381468)
2012-11-15 12:52:46 -05:00
Luke Faraone
6f345e393e
Update MIT template in collab with Waseem for clarity.
...
(imported from commit 99a406277b72dbb67ab08764e7984ef2b8953e53)
2012-11-15 11:36:57 -05:00
Waseem Daher
11c7d0e841
Ask user to reload Humbug after running sync-subscriptions.
...
(imported from commit d374d5b8eefd4240b8b11f83080fcdf2ff3cadaf)
2012-11-15 10:40:10 -05:00
Jessica McKellar
c447a7ba94
If a zwrite fails, retry unauthenticated and warn the user.
...
(imported from commit a8a516d59f4af72ed2eaebb6bfa65e2f359fc2a6)
2012-11-14 17:38:42 -05:00
Zev Benjamin
720d04a98b
Use request variable decorator in @authenticated_api_view
...
(imported from commit ec46ec307cfb34275ebc33e429663172d3f2d169)
2012-11-14 17:35:38 -05:00
Zev Benjamin
012840108f
Give more informative error messages for API authentication failures
...
(imported from commit e86495853c615915ca39be48128bd8f9bc312e5b)
2012-11-14 17:35:38 -05:00
Zev Benjamin
3cf6b27ec4
Make send-message API example program more flexible
...
(imported from commit e1fa90169500f84b088f1697c31641c24ed93bc8)
2012-11-14 17:35:38 -05:00
Tim Abbott
a4289e6553
Install the 'host' command on our servers.
...
(imported from commit 21171e553cf6974cd19170c47a79e3e7389b5534)
2012-11-14 16:57:21 -05:00
Tim Abbott
4198dc74f1
Fix banish_broken tool.
...
(imported from commit 505c4a86ab106abab4c36af7c5f67c955f143c1d)
2012-11-14 16:57:21 -05:00
Waseem Daher
834c812a14
Rename "send_message" to "send_message_form" for clarity.
...
(imported from commit 25d9bde3390e47390724a8d4b3fd1fe95b44bd71)
2012-11-14 16:19:56 -05:00
Waseem Daher
3cf29025ec
Prevent composebox form-handling code from running on all forms.
...
(imported from commit aee10dac671b1da83295d9e197eec4d3a0a7ceeb)
2012-11-14 16:14:48 -05:00
Tim Abbott
7ae73fabd4
Log how long requests take to process.
...
(imported from commit 89915f859e4493ff04a34d198ac6df5541b743cc)
2012-11-14 15:52:57 -05:00
Waseem Daher
b7a9e17b67
Rename 'search' input element to 'search_query'.
...
If we don't do this, we get all kinds of nasty shadowing where
references to 'search.whatever' seem to be references to the
HTML input element, rather than our search.js module.
(imported from commit 4e4b562ddf895baea9619316d9fab27ae5e9fc4e)
2012-11-14 15:29:18 -05:00
Waseem Daher
a1c4aa6865
Modularize search.js.
...
(imported from commit 72f00f832846124d833071fdd46b026c99189512)
2012-11-14 15:29:18 -05:00
Tim Abbott
50b8195bf3
api: Fix type error updating the failures count.
...
(imported from commit 5733f252f676549ff817df3a7560274ecec0cd2a)
2012-11-14 15:03:49 -05:00
Tim Abbott
b22249d861
Helper scripts to fix some buggy users.
...
We have a lot of forged users that have bad fullnames due to
historical versions of our fullname computations; this function will
clean those up.
Also, we have a bunch of users with emails like foo|mit.edu@mit.edu
that were the result of a mirroring bug that we want to get rid of
from autocomplete -- putting them in a useless realm name will do.
(imported from commit 6e305093653ca9d327e9e28491636e99d16cfe1d)
2012-11-14 15:03:49 -05:00
Tim Abbott
aecb8bd849
zephyr_mirror: Don't use the /mit symlink for use on systems without automounters.
...
(imported from commit b376e6da6c971d887f2d75194a8ed0d3adaddfea)
2012-11-14 15:03:49 -05:00
Tim Abbott
c00628d149
zephyr_mirror: Don't try subscribing to an empty stream list.
...
(imported from commit c8155459b768dd1fc192246c1f584abb30a7bc02)
2012-11-14 15:03:49 -05:00
Tim Abbott
2e11624b2f
zephyr_mirror: Don't send fullname data to server.
...
(imported from commit 743d0109f422fea5c4642e83448cd179f4e60827)
2012-11-14 15:03:49 -05:00
Tim Abbott
2ab8af0b91
Clean up now-unnecessary extract_sender.
...
(imported from commit c504838bec7ec14be8fb660015445c9bc20a2a88)
2012-11-14 15:03:49 -05:00
Tim Abbott
7227cb32f8
zephyr_mirror: Compute zephyr mirror fullnames server-side.
...
(imported from commit 9e6f6f9fe49d60ed30753582480e592613feb3c8)
2012-11-14 15:03:46 -05:00
Tim Abbott
0971b3d8e6
Add proper transaction handling in create_user_if_needed.
...
(imported from commit cab9cb4886acf61f36a0b0bc80d87ed9037cc414)
2012-11-14 14:33:31 -05:00
Tim Abbott
979560d2fe
mirror: Make check for duplicate messages more exact.
...
This should fix the problem where only one of pairs of identical
messages sent to two different zephyr classes by bots will make it
over.
(imported from commit 37005417e2e1f737501c9524b95b044eefbfe235)
2012-11-14 14:33:31 -05:00
Keegan McAllister
ce49595a00
reload: Remove dead variable
...
(imported from commit d3ec0d7c422990606817efcc47e7eb18c221ca25)
2012-11-14 14:18:05 -05:00
Keegan McAllister
6f2bbe5917
Set and check csrf_token for #reload
...
Fixes a message forgery bug (#335 ).
This works because Django will not generate a new CSRF token if a valid token
cookie is already present (see django/middleware/csrf.py).
(imported from commit 23222cb0bb62ae8a2f8ac7fb3f24bbc866103454)
2012-11-14 13:35:24 -05:00
Keegan McAllister
122281553a
Make csrf_token global
...
(imported from commit 734d9c886c3a77d2ba40bd449cb089a00807a656)
2012-11-14 13:35:24 -05:00
Zev Benjamin
585210feaa
Fix the "load more" button disappearing after the first time it's clicked
...
I think this broke during a rebase.
(imported from commit 1b8d28b72127b47fbca7d4c44bab77bec1e3d053)
2012-11-14 13:01:28 -05:00
Keegan McAllister
268492c45d
gcal-bot: Get API key from ~/.humbug-api-key
...
(imported from commit 63d63ad0d299c300d28de61069ada8ea2c8eb839)
2012-11-14 10:38:36 -05:00
Keegan McAllister
0d5c67c792
gcal-bot: Fix sys.path for new location under api/bots/
...
(imported from commit 9f5b90d5e0cd2134f2f0210980ad49fd8062a9c4)
2012-11-14 10:38:36 -05:00
Jeff Arnold
d473292f5c
Make enter not submit the form in private message compose box
...
Fixes regression introduced by 97a438
(imported from commit 2da31fb7a742a317c9d6839ef7a1a5f887746dd3)
2012-11-14 10:27:52 -05:00
Zev Benjamin
0a930cd87a
zephyr_mirror: forward messages in test mode if the site is not the default one
...
(imported from commit 7d504a6d555866f12f1657b522b4e6eb380c64a3)
2012-11-13 20:22:37 -05:00
Zev Benjamin
150a800b95
Don't reject mirrored stream messages because they don't have a recipient field
...
(imported from commit 1677ad91dc2e470c02a01a553d9d07789199a8d9)
2012-11-13 20:22:37 -05:00
Keegan McAllister
42a5ea9d2e
Specify requests.post data as a dict
...
These were lists of pairs because we were going to repeat keys, but that didn't
work anyway.
(imported from commit 687b3f7b8a2821d057719c725f1f39db3992ae5c)
2012-11-13 17:33:41 -05:00
Keegan McAllister
f82e8fc4d1
Move Markdown rendering out of the Tornado server
...
(imported from commit fc726939aa1061c40b292899dbbc9ade3b29ea01)
2012-11-13 17:33:41 -05:00
Zev Benjamin
9c99e00228
Normalize the sender email while we're at it
...
(imported from commit 1c245156809da77b4bef7a4396e8c0bee5724490)
2012-11-13 17:25:13 -05:00