Commit Graph

3949 Commits

Author SHA1 Message Date
Tim Abbott ac1f9b5128 check_message: Allow zephyr mirroring bot to send to invite-only streams.
(imported from commit d45c75915cc4e29328768f1ed0e0ec972e5b7269)
2013-08-28 19:07:05 -04:00
Tim Abbott 5b62101a5f check_message: Clean up confusing and redundant authorization checks.
(imported from commit 1b756c89ec740f988e8f15d21fb413de9947d658)
2013-08-28 19:07:05 -04:00
Tim Abbott 591b42bb1c bugdown: Clarify code around inline_interesting_links processor.
(imported from commit a1d734230135ab9099fafea7814bfec25754ea4e)
2013-08-28 18:56:53 -04:00
Jessica McKellar f67f5b7619 Allow superusers to send messages to even private streams.
(imported from commit b7253174fa25d61b5bda056a5e5353e3b8ea918b)
2013-08-28 16:43:40 -04:00
Jessica McKellar d72ed33dc6 Be more verbose and explicit in the checks on who can send a message.
It was getting hard to follow and is going to get more complicated
with a new super user check in a later commit.

(imported from commit 8d5cfa960824519d87ce0f09aab3a120ba9ef357)
2013-08-28 16:43:40 -04:00
Steve Howell 5b598a6d9c Avoid churning the cache for stream name changes that don't change the cache key.
(imported from commit 1cc1ed01eaaaec4e6ddd6901fb5b877f831b604c)
2013-08-28 13:34:26 -04:00
Steve Howell 6aecdda7f7 Allow stream renames like corporate -> Corporate
(imported from commit 46d5078fb700631ef2a5b847eeeb055ff75d87d1)
2013-08-28 13:34:25 -04:00
Jessica McKellar 97f0320dd1 Add the backend facilities for renaming a stream.
An important part of this is updating the various caches that cache
the display_recipient.

(imported from commit 888bf54fd205516cf31a25ba3f4e45ad11bbd4d5)
2013-08-28 10:23:39 -04:00
Jessica McKellar c1439c8853 actions: factor stream name checks into a function.
(imported from commit e107e895f247f6bfafe2c21de12d8a3c5de9268a)
2013-08-28 10:23:39 -04:00
Jessica McKellar cd4daaa41f Factor the display_recipient cache key into a function.
(imported from commit 4a80c4db6ddcf8104f45b6b068e598378e655bc0)
2013-08-28 10:23:37 -04:00
Jessica McKellar d64c09b1ed Add a cache_delete for deletion of items from memcached.
(imported from commit 4fbdc4c4b230a5ab029dacc2463437f81fb0d023)
2013-08-28 10:23:04 -04:00
Jessica McKellar 21d857e577 Add a cache_delete_many for bulk deletion of items from memcached.
(imported from commit 33fc65dce89e51b99f13b50216d975272a028c16)
2013-08-28 10:23:03 -04:00
Jessica McKellar 2dbe6914d9 Factor out finding active user IDs to a function.
(imported from commit c2d25b24833be900af40d45331e4b9eb9e3a2dc6)
2013-08-28 10:23:03 -04:00
Tim Abbott 648e85160d Fix buggy application of subscription update events.
(imported from commit 4c76dc3ee5d3d1a298591c0c60dbe0e3aa30e0af)
2013-08-27 19:12:20 -04:00
Tim Abbott 77dbbe7f23 zephyr_mirror: Require zcrypt when mirroring to invite-only streams.
(imported from commit 1b88a8fc9bc26f2f9b1bb3f037093f85255feb17)
2013-08-27 18:26:12 -04:00
Tim Abbott 134da30fdf Add webathena authentication button for Zephyr users.
This shows up when you're not running a Zephyr mirroring bot and lets
you use Webathena to have us run it.  Obviously needs more docs.

Current problems include:

* supervisorctl reload ends up recreating /var/run/supervisor.sock
  with the wrong permissions, so it only works once in a row before
  you need to chmod that.

* /etc/supervisor/conf.d needs to be humbug-writeable; this is a clear
  local root vulnerability

* This uses SSH and thus is kinda slow.

(imported from commit 7029979615ffd50b10f126ce2cf9a85a5eefd7a2)
2013-08-26 18:17:25 -04:00
Scott Feeney 0856274fd2 Change empty messages to '(deleted)'
Before this it was [deleted]. Using parens is consistent with how we put
in (no topic) if you don't specify a topic.

(imported from commit 931c06a1096cf7b0d226336cbe82535abd2e6032)
2013-08-26 14:13:42 -04:00
Kevin Mehall 7f1a1dba9d Show realm emoji in typeahead and update the list via events.
(imported from commit bd8b8be5d088d503cac2b72cf228e769827e2308)
2013-08-23 21:39:29 -04:00
Kevin Mehall e2a13637f2 Management command for realm emoji
(imported from commit 4de3ac69c34bc6e92d180c672fa8276338fecf53)
2013-08-23 21:39:29 -04:00
Kevin Mehall d8146141a9 Render realm emoji.
(imported from commit 5a8dca8963bc6e2e16762844aebaefcb85a6aad2)
2013-08-23 21:39:29 -04: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
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 00fc004be2 Server-side check for empty (or all-whitespace) messages.
(imported from commit 49054dd7a8050705f579b4b7a1bda7eb7bfc25be)
2013-08-21 10:37:36 -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 26cd96f132 Let clients specify how long queues shall live, within limits
(imported from commit 86609f6611ed37b45b28c31e541528ce260d62c8)
2013-08-20 16:19:07 -04:00
acrefoot 395aaae994 Allow anyone to edit a "no topic" message
This change would allow anyone in the realm to set a topic for a "no topic"
message. As soon as the message topic is set, only the sender can change it again.

(imported from commit 0a91a93b8fd14549965cedc79f45ffd869d82307)
2013-08-19 16:29:30 -04:00
Jessica McKellar f530e3b930 Display the email address for a stream in its stream page detail.
For now, only show it on staging.

(imported from commit fd07fad1c34578d8ddc2cddd1bb6bdcb72f354de)
2013-08-13 14:28:47 -04:00
Jessica McKellar 15afdf65eb email forwarder: encode stream names so they are safe in email addresses.
(imported from commit 6699d656e3cae58fad062a1403fb9923429fde89)
2013-08-13 14:28:47 -04:00
Luke Faraone af4c34330b Switch to checking database is_bot field instead of using a heuristic.
This has the amusing side effect of showing all the Zulip bots in the
administration view because none of them have the is_bot 	 set.

(imported from commit cdec19d2109c092018c1f331aa32f345d1587683)
2013-08-13 14:20:18 -04:00
Zev Benjamin 307bba5b29 Add comment to some zephyr mirror CC de-duplication logic
(imported from commit 86680f24329475dccc79731639d51a735fa873bf)
2013-08-13 13:48:32 -04:00
Zev Benjamin 91c0be44a1 Raise JsonableErrors while checking messages instead of returning error strings
(imported from commit 986ad1e19dd508b12386c57cf093b32d3fbcf49e)
2013-08-13 13:45:10 -04:00
Zev Benjamin bfebfbbff5 Make error messages a little more consistent
(imported from commit 77baba591628bef6b8b8b0ae28a9e05ec2fac693)
2013-08-13 13:45:10 -04:00
Zev Benjamin 6fcfcf3f32 Fix comment
(imported from commit 6f8eac90e5b011bd25b09e562ebcb9d2cae39a06)
2013-08-13 13:45:09 -04:00
Zev Benjamin bcc03dd4ab Do full-precision time comparison when checking for duplicated messages
We've had microsecond-resolution timestamps since we migrated to Postgres.

(imported from commit 81fe79f00097ceb40105645aa04a2f0ee29d3a19)
2013-08-13 13:45:09 -04:00
Luke Faraone 3129b6374d Fix broken parsing of DNS response.
(imported from commit 3a627d45bc313bf244dc699a59df9423c849bc35)
2013-08-13 10:21:24 -07:00
Waseem Daher abef6be12f bugdown: Unescape HTML entities in Twitter.
This closes Trac #1071.

(imported from commit 521ffa6ed13df7c08e67218564d426ca90080948)
2013-08-12 17:23:49 -04:00
Luke Faraone 0cb741d7cc Removed confusing ALLOW_REGISTER setting.
ALLOW_REGISTER was no longer being used in determining whether you could
register for the app, so I've removed it to avoid additional local-dev /
production issues.

This closes #1613.

(imported from commit c928c6d350602d35f745ae1e60d734e4567885fc)
2013-08-12 16:16:26 -04:00
Luke Faraone 368ace069c Use PyDNS instead of shelling out to `host`
On Debian systems, this is found in the `python-dns` package.

On OS X and others, install "pydns" using your Python package manager.

(imported from commit 17827d0a1d3d72b12945df5563295a1573bfa1ed)
2013-08-12 13:09:19 -07:00
Zev Benjamin 9c8a9ac947 Correctly return the message id for already mirrored zephyr messages
This was previously causing us to generate a traceback every time we
hit a duplicated zephyr due to CC'ing.

(imported from commit 240e1559655d0166dcd864e84649ab97b87a29ad)
2013-08-12 15:49:19 -04:00
Tim Abbott 7fa448cdef Return the message ID when sending a message.
Our API documentation says that we do, and it seems like it could be
useful to clients, so we might as well do it.

(imported from commit c391e4952a09d41df4dc06e3dc6ee094f774822b)
2013-08-09 15:35:33 -04:00
Jessica McKellar 3f8dfc7b9b Move to a common random token generation function instead of several one-offs.
(imported from commit 3217de5384088deff68fbffc6bd481c045a76817)
2013-08-09 14:59:26 -04:00
Waseem Daher 49849a214f New onboarding step: Set up an integration.
(imported from commit 2c6cc6f703e893b44b2871c9510e858743d417ad)
2013-08-08 17:23:27 -04:00
Tim Abbott 7b9305b06f Rename Django project to zproject.
This includes a hack to preserve humbug/backends.py as a symlink, so
that we don't need to regenerate all our old sessions.

(imported from commit b7918988b31c71ec01bbdc270db7017d4069221d)
2013-08-07 11:04:03 -04:00
Tim Abbott d59ba39518 Rename humbug_finish to zulip_finish.
(imported from commit a73ef9302d16a4068c7d050d4882d2eba699488d)
2013-08-07 10:00:08 -04:00
Tim Abbott d63a398716 Change Humbug => Zulip in name of error limiter module.
(imported from commit 55c5deba463faecc50da22e9745fd13ad8b11fd8)
2013-08-07 10:00:07 -04:00
Tim Abbott 1f1af26048 Change Humbug => Zulip in text/comments.
(imported from commit 2f9d73431ae40e1b9e9e11bc2f4f62f566ae758a)
2013-08-07 10:00:07 -04:00
Steve Howell 9f9c7c3e3b Loosen up emoji regex. (i.e. More emojis! 👍)
Now parsed: 🍺,🍺;🍺!

 If \w characters surround :foo:, we still say it's NOT an
 emoji, but we used to do this for \S characters, so it's loosened up.

(imported from commit 49b33d2f0ffdcfde8947ae411a4addcf4c24af9c)
2013-08-06 18:20:30 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00