Commit Graph

3580 Commits

Author SHA1 Message Date
Tim Abbott ef7786d777 Create a Recipient for classes created by sending a zephyr.
(imported from commit 8556392f84b0a7fc21b6405c87ceac1c49b37a52)
2012-09-06 15:43:35 -04:00
Tim Abbott 47323bf279 Mechanize code to login to our application and forward zephyrs.
(imported from commit bb7aa22a67fe2ca9346d1f192c8d1e1aa102ef43)
2012-09-06 15:39:38 -04:00
Tim Abbott d466738116 Fix creating new classes by sending messages to them.
(imported from commit a85034081d23f5366e0cdc4b906fd42b4b646aba)
2012-09-06 15:35:12 -04:00
Tim Abbott 742d8a40a0 Set the homepage as LOGIN_REDIRECT_URL
(imported from commit a65eec79d7c64e02969699a7288313227f85b99f)
2012-09-06 15:35:01 -04:00
Luke Faraone 3d1e956069 Don't check for class existence if we're not sending to a class.
(imported from commit 832de3f899d90ee727cebeede061de6a409b7845)
2012-09-06 15:19:56 -04:00
Jessica McKellar ebfb696ff7 Add tests for POSTs to /update.
(imported from commit e936d0f2abe21da70ef653ce27c290c31dd091c6)
2012-09-06 15:02:27 -04:00
Jessica McKellar 4f04172288 Add error handling on bad POSTs to /update.
(imported from commit 7893e9d339559a6f6e945d0f8d3d9efbdce01f55)
2012-09-06 15:02:27 -04:00
Jessica McKellar df14dc0cf7 tests: Factor out retrieving user profiles from usernames.
(imported from commit 004eabb8684952199b8a132eb29be3ce5daae724)
2012-09-06 15:01:57 -04:00
Keegan McAllister b1eb0fd0fd Inhibit caching of zephyr.css
(imported from commit 5e1af66b12454f791f7edfcc3f01be03b00e4b2f)
2012-09-06 14:54:10 -04:00
Luke Faraone f6b481546f Offer to subscribe / create classes if user zwrites to a non-subbed class
Here we check if a class exists. If not, we prompt the user to create, sub,
and send his message to the class. If the class exists but we're not subbed
we prompt the user to sub.

This commit also added a decorator to views.py and refactored out some
redundant code.

(imported from commit 7234ef6c080f2a6de6ff0922635dddd90032f7fe)
2012-09-06 14:33:55 -04:00
Tim Abbott 31ece4d3aa Fix narrowing by instance.
(imported from commit 824f0c113b9b6970bd451f4b0c3285dd3b88d9c4)
2012-09-06 11:17:39 -04:00
Tim Abbott e66e2f3be6 Fix new instance of recipient_id.
(imported from commit 4b3442a3a45138e18c2b33867d6c5af4b4427691)
2012-09-06 11:06:25 -04:00
Tim Abbott ef25dffb92 [schema] Add the realm to the ZepyhrClass objects.
(imported from commit 8189ef27f2feef0c92f9c06a9243c085e36a66f5)
2012-09-06 11:02:34 -04:00
Tim Abbott b761bf030b [schema] Fix names of fields in Subscription.
(imported from commit 5f5c643286d348d16caac03419ba3011a8b81eff)
2012-09-06 11:02:34 -04:00
Tim Abbott 38b30e5997 [schema] Add realms to the schema.
Note that realms aren't actually used for anything, aren't prompted
for, etc, so this is mostly just a schema change and the refactoring
needed to allow setting the realm in the future.

(imported from commit b8b483dcc9601b288702284879e9c99707a50a5c)
2012-09-06 11:02:34 -04:00
Keegan McAllister 4dd1567426 Keep third-party jQuery style in the jquery dir
(imported from commit 9e34277b90c13b3ce71521fe0657014f186fc1c3)
2012-09-06 11:00:34 -04:00
Jessica McKellar aea9682288 Handle zephyring to a huddle with an invalid username.
(imported from commit 953b242aff98782faab8eb2c7a9528ad4bfbcd54)
2012-09-05 18:01:07 -04:00
Jessica McKellar f539b5ec59 Handle trying to send a zephyr to a non-existent class.
(imported from commit 38c6df92ae8dc9dee358aa9af0ef592943b82429)
2012-09-05 18:01:07 -04:00
Jessica McKellar 22c2a868c1 Factor out json success and error handling.
(imported from commit 1891e077a18615d47710faf56b04c4bd160454fa)
2012-09-05 18:01:07 -04:00
Jessica McKellar cede8e59fb Return a 400 and error message instead of 500ing on a personal to an invalid user.
(imported from commit b8cdf342f2919aa0dbd2e30764c7662b6756aa57)
2012-09-05 18:01:06 -04:00
Keegan McAllister 0788f2efe6 get_updates_longpoll: Retry indefinitely, with exponential backoff
The client still won't recognize when it's reconnected, if there is no traffic.
Probably we should have the server send periodic heartbeat messages to the
clients, and make the clients look for them.

(imported from commit 4dab3ddf20bf3c48a65b9395c1e24b635b70aa81)
2012-09-05 16:37:20 -04:00
Keegan McAllister c3aaf54468 get_updates_longpoll: Timeout and retry
We're currently proxying through Apache, which will eventually drop an idle
connection to the app server.  Before that happens, drop it on the client and
retry.  This may also help with flaky Internet connections.  This timeout isn't
really an error condition and is naturally rate-limited, so we retry
indefinitely.

(imported from commit 45fbf812af63ed331fe046d85c64c97c1ec57611)
2012-09-05 16:37:10 -04:00
Luke Faraone 3366346144 Return subs in JSON based on a query of your subs list rather than sorting through recieved zephyrs.
(imported from commit 451435aee2c2cf6ee542468b1c91c4a15edf2032)
2012-09-05 16:15:38 -04:00
Keegan McAllister db858afe4a apache: Timeout talking to app after 20 minutes only
We need this to be longer than the client-side AJAX timeout (future commit)

(imported from commit a638c8392fd7ee1e5c1bee557012dbdd28f1547f)
2012-09-05 15:53:40 -04:00
Tim Abbott e9b6ce6124 Fix subscriptions page showing huddles.
(imported from commit bed5fd30c509dcd5f169081396f72107dc08c750)
2012-09-05 15:32:06 -04:00
Keegan McAllister 53690d757f Avoid infinite tail recursion in get_updates_longpoll
Javascript doesn't guarantee tail-call optimization.  Also we should yield
control back to the browser in case it needs to catch up on rendering.

(imported from commit 1c35c0c2c39f13311b98bfb6221a1bac1fb22de8)
2012-09-05 14:06:19 -04:00
Keegan McAllister 1f522eddac Move zephyr rendering inside longpoll success callback
(imported from commit f7c2bbb0a31b339892a033e4192e44cb53b0d62c)
2012-09-05 14:06:08 -04:00
Keegan McAllister 162cb075b7 DEBUG: report longpoll events in JS console
(imported from commit f82edf2fcec66ec119319a691281726a16a46b31)
2012-09-05 14:00:56 -04:00
Keegan McAllister 2332fa2c72 Log server events with timestamps
(imported from commit b74274ccafcca716871058b8f9bde8dfe9e081ee)
2012-09-05 13:47:25 -04:00
Tim Abbott 3218f917ae populate_db: Repeat recipients a moderate fraction of the time.
(imported from commit 1a42ec5b585a7a64e24576350c61399601177877)
2012-09-05 13:42:05 -04:00
Tim Abbott 527058a202 Add personals and huddles to populate_db.
(imported from commit 98a8decc18bad4700260f125873ccc4367f73ebe)
2012-09-05 12:38:35 -04:00
Tim Abbott 8eb778dc32 Fix display of which people we're showing personals with.
(imported from commit 4e2f2554c9af4b176dcbbe6300b72c2ce69bc8bd)
2012-09-05 11:48:35 -04:00
Keegan McAllister 04b1c21333 Remove some unnecessary intermediate lists
Use generator comprehensions for efficiency and cleaner code.

(imported from commit 6b4b709515b5c904ef38b8ea33a9d4a4af0f5468)
2012-09-05 11:41:53 -04:00
Tim Abbott 3e51ef8c1c Fix get_huddle handling of id_list.
(imported from commit 0fe1ee15b2fc6b3bef98ac47f1094b89e776c751)
2012-09-05 11:38:09 -04:00
Tim Abbott 254b118bd6 Fix an error in huddle comments.
(imported from commit 85a06b53de1027815e1d2bbd4c6354801495fffe)
2012-09-05 11:32:05 -04:00
Tim Abbott 1f151214c0 Move the huddle recipient uniquification into get_huddle.
(imported from commit 09378b583becce6467d65d6caec71a543e27be2e)
2012-09-05 11:30:40 -04:00
Keegan McAllister 5ac4b4345e Point at the first zephyr if the initial pointer is invalid
(imported from commit 7661a7d23f1d161815f2a22048cd23ede76e1758)
2012-09-05 11:24:29 -04:00
Keegan McAllister 7cb3c05b40 Cleanup / local var in hotkeys
(imported from commit 8df3d84495d0d50b0987037dceb8b16023866119)
2012-09-05 11:24:28 -04:00
Keegan McAllister 49704b84f3 Clean up select_zephyr
Eliminate some global variables, and other style fixes.

(imported from commit 95dfbaa024d709f5b98238afcf904f3e92c8a260)
2012-09-05 11:24:28 -04:00
Tim Abbott 20215eef86 Remove a bunch more trailing whitespace.
(imported from commit 5d1cc8dcb0b26eaf95ddca26574b361b6948cdb8)
2012-09-05 11:23:58 -04:00
Tim Abbott fe43dc008f Clarify comments about huddles.
(imported from commit b4b779c48289e0f78490c0e93ece19b55a6f2dee)
2012-09-05 11:19:31 -04:00
Tim Abbott 08b55de0af Add support for replying to huddle messages.
(imported from commit 21c760838fa87bf524ff178eab6473dfa3c6921c)
2012-09-05 11:19:31 -04:00
Tim Abbott d13e7d5c2a Clean up prepare_personal function.
(imported from commit 497ff1ff2162eba879728755cf37e6317530a641)
2012-09-05 11:19:31 -04:00
Tim Abbott 6e427d4aa1 Remove trailing whitespace in zephyr.js.
(imported from commit d003d9c337239e90f6dbda16f6624c42909a88b7)
2012-09-05 11:19:31 -04:00
Tim Abbott 7105ea9290 Improve the huddle hashing keys.
(imported from commit e8e1f1ac3022f3cecfdd22d1d4f319cc4f1ce886)
2012-09-05 11:19:31 -04:00
Tim Abbott 6de871a698 Fix double-sending to huddle recipients.
(imported from commit 649c01c6d0f1c826d3db9444f48af16ee1eb8d06)
2012-09-05 11:19:31 -04:00
Jessica McKellar 2694183a9d Make clicking on a personals user narrow to the conversation with that user.
Previously, clicking would narrow to all personals. The gp hotkey
combo still does that -- we'll need to think about the UI for making
both types of narrowing easy.

(imported from commit acce1da52de1b9b757ef76a9734d61f399f81a01)
2012-09-05 11:03:53 -04:00
Luke Faraone 3db1766015 Fix broken narrowing on classes with keyboard shortcuts.
(imported from commit e829c55e88a57c4dbe4693c41f15eaf27a025daa)
2012-09-05 10:56:59 -04:00
Luke Faraone be3a69611a Restrict new_zephyrs in add_callback to current user's subs.
(imported from commit 7aab1b081cf9b8602512402547fe3592cf710d82)
2012-09-05 10:43:36 -04:00
Keegan McAllister 3078d9c0b6 Nuke tabs in Apache config
(imported from commit 0a858d7885294cef297bc4e0b3876af2fd1ab93e)
2012-09-05 10:36:01 -04:00