Commit Graph

5950 Commits

Author SHA1 Message Date
Leo Franchi 0f377a1277 Use stats.zulip.net instead of old stats internal IP
(imported from commit 1ec504b953272e2b52b80e202b099764dceb2be0)
2013-08-21 17:47:17 -04:00
Luke Faraone a305a7de63 Up offline threshold to 140sec and decrease ping interval to 50sec.
This is intended to help us debug what's going on with presence information.

(imported from commit 637ccea594ae51bc7b266620596180479ee754f0)
2013-08-21 14:45:01 -07:00
Kevin Mehall 8b365a5681 Use '[deleted]' instead of failing if you edit a message to empty.
Trac #1571

(imported from commit a51602d72aa2b89ce451946ae7f5a5363a6421f4)
2013-08-21 16:49:24 -04:00
Kevin Mehall f944a8ed0e [third] Don't move typeahead popups when the body scrolls.
Trac #1479

All our typeaheads use this, but I made it an option that must be enabled
explicitly since it is not default bootstrap behavior.

(imported from commit 97852dc407d1f6dbe46b5fdd2c56d3ed8c6718d2)
2013-08-21 16:29:12 -04:00
Allen Rabinovich 834ff7d750 Remove JS logic for resizing floating recipient bar and composition area and do it with pure CSS instead
(imported from commit b19d1b008cc070f29e08fd93416e9a5d01e2f110)
2013-08-21 12:26:45 -07:00
Zev Benjamin 3f95e54dc1 dict: Add setdefault method
This is like Python's dict.setdefault.  I don't love the name, but
the consistency is nice.

We have lots of places where we do things like:

    if (! dict.has('foo')) {
      dict.set('foo', []);
    }

    var arr = dict.get('foo');
    arr.push(3);

We can now write:

    var arr = dict.setdefault('foo', []);
    arr.push(3);

(imported from commit b8933809c69ba47ec346ed51d53966793403e56c)
2013-08-21 14:11:39 -04:00
Zev Benjamin 62aec87962 dict: Make set() return the value passed
We were accidentally leaking our internal representation.

(imported from commit 08ddc42583fb13a2ad51eea7ed1b30bf5ccb4645)
2013-08-21 14:11:39 -04:00
Zev Benjamin 707898b236 bitbucket: Allow the stream to be specified
(imported from commit eea7392551b568502c01e59c89056b4369fe53e0)
2013-08-21 13:41:03 -04:00
Tim Abbott 8879b84293 run-dev: Ignore certain request.finish() exceptions.
(imported from commit e797c0a6f5cd753bd84069bff202b421f0ff3be9)
2013-08-21 12:01:55 -04:00
Tim Abbott 33872fc427 puppet: Fix path for rabbitmq-numconsumers.
(imported from commit 8d893057e837c8e8f45bc262cc7f3477ea5da415)
2013-08-21 12:01:55 -04:00
Luke Faraone a1a5d00e9f Update your presence dot when your activity changes.
(imported from commit ecdc056db987d4404ded01092f5693ac8dd28ae9)
2013-08-21 11:10:31 -04:00
Luke Faraone f17d030272 Send IDLE continuously when idle, interpret a too-old status as offline.
This helps make our statuses more meaningful and should resolve trac #1534.

As part of this, we lower OFFLINE_THRESHOLD_SECS to 1.1̅6 minutes and
mark the user as idle after 5 minutes.

(imported from commit ee6b1ad203554a84b11e16c4c6195be9df5bcf4f)
2013-08-21 11:07:45 -04:00
Kevin Mehall e6de154e0d Reject messages consisting solely of whitespace.
Trac #1701

(imported from commit 48a172e17f69d11596ecf9a5b13cd48a074966c3)
2013-08-21 10:37:50 -04:00
Kevin Mehall 00fc004be2 Server-side check for empty (or all-whitespace) messages.
(imported from commit 49054dd7a8050705f579b4b7a1bda7eb7bfc25be)
2013-08-21 10:37:36 -04:00
Scott Feeney 371083e698 Keep invite link on screen when user list is long
(imported from commit ae775a6a91a485070fa65f8429ee919b1e33427e)
2013-08-20 17:40:43 -04:00
Tim Abbott 1901ebe49d Fix showing invite-only streams on stream list.
(imported from commit f364c2fa28009f2cdfc9aed225d4a9a8c8a1d3c1)
2013-08-20 17:34:24 -04:00
Tim Abbott 8aa11a60f8 Fix tracebacks opening stream on streams page.
This was caused by a branch I was working on conflicting with the
stream_data.js split.

(imported from commit 995dcf1412114bd36404b8c7ef66eb6f1e89648a)
2013-08-20 17:15:56 -04:00
Tim Abbott b8873e3283 Use /var/lib/nagios_state over /var/run/nagios for check status files.
The previous path would get destroyed on reboot.

(imported from commit 27e8fa54fc1e4001166db93b1fb59e87e0b1ccf5)
2013-08-20 17:09:09 -04:00
Tim Abbott 97e85e80bd check-mirroring: Move log file under /home/humbug/logs/.
This is for consistency with where one goes for server logs on our
normal frontends.

(imported from commit 094f4cd1ca6c64497594827e12d8100bbb9bd6ab)
2013-08-20 17:09:09 -04:00
Tim Abbott 6253483003 zephyr_mirror: Send outgoing messages encrypted when zcrypt would.
Our .crypt-table parsing code isn't quite correct, in that we don't
handle either the "zcrypt default" or "zcrypt by class/instance" pair
options (for sending messages in either direction) -- you have to be
zcrypting for an entire class.  I think this makes sense given that on
the Zulip end we can only enforce anything on a stream level.

(imported from commit a7901b1dc025a04a23ee71ecdd499e3f150ba614)
2013-08-20 17:09:09 -04:00
Leo Franchi 8484cac5c9 Add a messages/flags POST api call to change a message's flags
(imported from commit b51ebd94c99f57f1cda19039023013209556e343)
2013-08-20 16:19:07 -04:00
Leo Franchi f8b7b54626 Log message flag changes to our event queues
(imported from commit 72fcea1a98c6a5be81f32963d51453f4bb12ace0)
2013-08-20 16:19:07 -04:00
Leo Franchi 33f4837570 Only count message queues when determining whether to deliver missed message emails
(imported from commit 5a302489f3bcb19e2824452a0d3c1330e483af7f)
2013-08-20 16:19:07 -04:00
Leo Franchi 26cd96f132 Let clients specify how long queues shall live, within limits
(imported from commit 86609f6611ed37b45b28c31e541528ce260d62c8)
2013-08-20 16:19:07 -04:00
Zev Benjamin 59041d993b dict: Move Dict.from(otherdict) functionality into clone method
(imported from commit 6a3981a726922d7acf55b49ea2d477271da430d3)
2013-08-20 15:37:08 -04:00
Zev Benjamin 2c775d0894 Make recent_subjects case-insensitive
(imported from commit 36c423f506c1e8dc0536c80a4a085b689623191a)
2013-08-20 15:37:08 -04:00
Zev Benjamin a53d6801a3 dict: Add option to make has() and get() case-insensitive
keys() and other methods that implicitly return keys return the
casing used for the most recent set()

(imported from commit 47cac13c2b928fd19b07c44fd1504426fb36e3d8)
2013-08-20 15:35:53 -04:00
Zev Benjamin 96483356c8 dict: Do a direct copy for Dict.from(otherdict)
(imported from commit 25ad11913dcb9a5ceb637d6571fa04e5586de842)
2013-08-20 15:35:53 -04:00
Zev Benjamin 3a70c4e928 dict: Make copying Dict constructor a class constructor method
(imported from commit 7bd5f6029c1290036a47688cf2b80f9317fe9c13)
2013-08-20 15:35:53 -04:00
Zev Benjamin 43847848c5 dict: Change internal representation to store the original key
This means that we no longer need to unmunge keys at the expense of
having to store the original key.

(imported from commit 958c33c806b8b399e9a9290e4f14ef119d923c14)
2013-08-20 15:35:53 -04:00
Tim Abbott 605171d1da zephyr_mirror: Renew kerberos tickets when starting up class mirror.
(imported from commit 34b0a78558c6f20043efe986a16064387f36f1c0)
2013-08-20 15:27:24 -04:00
Tim Abbott a8e28bb99a puppet: Set correct permissions for supervisor.sock.
We can't do this with a "file" entry because it doesn't handle objects
of type socket.

(imported from commit 5f0f79f1a7905c4d70cc7e2f4c474b0629841c12)
2013-08-20 15:27:24 -04:00
Tim Abbott 65520d99b8 zephyr_mirror: Fix zephyr/zerver path conversion.
(imported from commit bb895bac50754a601a09639cba596ed65956dc9b)
2013-08-20 15:27:24 -04:00
Tim Abbott 12ec430cb8 puppet: Fix typo in email mirror configuration.
(imported from commit f81ca5ba28046be701f672df1fc3409e09841aec)
2013-08-20 15:27:24 -04:00
Tim Abbott 6850f25907 [manual] puppet: Move rabbitmq cron jobs into puppet.
When we deploy this, we should remove the relevant jobs from root's
crontab on our app servers.

(imported from commit 749be952d504f5a4d243cf59f6430acc689fc821)
2013-08-20 15:27:24 -04:00
Tim Abbott 9e6e57f349 puppet: Run sync-public-streams via supervisor.
(imported from commit f515cd36cd3138bcc8a13310276f3a6bb961ce33)
2013-08-20 15:27:23 -04:00
Tim Abbott b4adabfaf0 zephyr_mirror: Auto-detect Python version for pyzephyr path.
(imported from commit e2aca3a08f8aa12b43d71acffcc0e2249feb7ca7)
2013-08-20 15:27:23 -04:00
Tim Abbott 1a7d946bd1 puppet: Move zephyr_mirror crontab into /etc/cron.d.
(imported from commit e93e630704ce7e85346f54f095c642010058fc09)
2013-08-20 15:27:21 -04:00
Tim Abbott c7be859d21 puppet: Run zephyr_mirror.py via supervisord.
(imported from commit 09086a1dd298e7ee9b655ccd6c58ac720bbc7798)
2013-08-20 15:26:50 -04:00
Tim Abbott 00279ae705 puppet: Add debathena.list to zmirror configuration.
(imported from commit 3d54bd495b5f8f582ec4d1f7a859ac0c0b63930b)
2013-08-20 15:26:50 -04:00
Tim Abbott 52cbbdfc2f zephyr_mirror: De-zcrypt messages for which we have the key.
For now we only support the AES encryption type since the DES one is
probably not used anymore.

(imported from commit 222606db9f704917e74159e7d07a110187a236e6)
2013-08-20 15:02:07 -04:00
Tim Abbott c5fcbe103c zephyr_mirror: Handle syncing subs with invite-only streams.
(imported from commit ec8d0c0d13ff0a81fa4a5e1225e94e6dad997356)
2013-08-20 15:02:04 -04:00
Tim Abbott 517c98d56f add_subscriptions: add authorization_errors_fatal parameter.
For syncing streams between Zephyr and Zulip, we need to be able to
have the API client send the server a long list of streams, some of
which might be invite-only, and add the ones that it can add and not
the ones it cannot without a bunch of annoying round trips dropping
individual streams one is not authorized to one by one.  This argument
makes that possible.

We might find other applications as well.

(imported from commit 9236d185897c42218ab6cac3d8f3ddcb1bbc94e9)
2013-08-20 14:57:15 -04:00
Tim Abbott 5f724a94ac Add support for invite-only streams in mit.edu realm.
This changes the mit.edu access rules from:

* Susbcriber list and inviting users to streams are unavailable

to

* Susbcriber lists and inviting users to streams are only available
  for invite-only streams

streams must still be made invite-only manually.

This both cuts down on the amount of code that is different between
the mit.edu user experience and the standard one, as well as paving
the way for us to invite-only streams for zcrypt.

(imported from commit 24e0e85428608c05c89eeea349338dd392e5489a)
2013-08-20 14:57:14 -04:00
Tim Abbott 53e62d4e7b Use bulk queries when checking auth for invite-only streams.
This gets rid of our last query-in-a-loop in the code path for adding
subscriptions.

(imported from commit d192a7723647f49878fc05028e78d593077a3b78)
2013-08-20 14:57:14 -04:00
Tim Abbott 3396dc3aa9 list_to_streams: Return which new streams were created.
(imported from commit 95f6701c3d9e4ea31bbf2470fe91d05f7f1f5a17)
2013-08-20 14:57:14 -04:00
Tim Abbott a0238fcfcc list_to_streams: Rename existing_streams.
(imported from commit f7aec045fc9ead2911328860341fde31001c9456)
2013-08-20 14:57:14 -04:00
Tim Abbott 8641749774 Move zephyr/administration.html to zerver/ path.
This one slipped through through a race between it being added and the
zerver migration.

(imported from commit 23ed79efa16584f062844fa05db3a95b8835060c)
2013-08-20 14:57:14 -04:00
Tim Abbott 3ffc3bc7f6 Don't filter invite-only streams for mit.edu superuser.
It's likely we'll eventually want to split this into 2 API queries,
but most of the code in get_public_streams_backend is specialized for
the performance requirements of the mit.edu mirroring anyway.

(imported from commit 47ac6586b59467fd64992c573b6e36885167dcc5)
2013-08-20 14:57:14 -04:00
Tim Abbott f446b72233 zephyr_mirror: Add option to control path to streams file.
This makes it easy to test the class mirror on just a single test
stream.

(imported from commit 3decb1ced54507683f1c0634df14f73e693104ef)
2013-08-20 14:57:13 -04:00