Commit Graph

185 Commits

Author SHA1 Message Date
Tim Abbott 47500d8352 [schema] Add a bit for whether inactive users are mirror dummies.
(imported from commit bb21bb2c62ac09742484d7a4ca8907e7d864b982)
2014-01-09 11:08:35 -05:00
Jessica McKellar 511e1a12e3 Add a management command to deactivate old realms.
(imported from commit f6b1d0cb5b10f91683afcffea88b23b1a75a9ad2)
2014-01-07 20:24:20 -05:00
Leo Franchi c7836626ea Accept a pass-through local_id option in send_message
(imported from commit 3f7b8e862a92d8a11b68da9ff23f711b6b25b5e2)
2014-01-07 17:33:34 -05:00
Leo Franchi 76892c52aa Send realm filters to clients
(imported from commit a3ba31701baa4d515ea3bf36c39d7255f1dd20d6)
2014-01-07 17:33:33 -05:00
Steve Howell 654ce3e0c7 Add make_stream_private endpoint.
(imported from commit b504c24fd651ecf8814e64725a9f303dc085b14e)
2014-01-06 11:59:47 -05:00
Steve Howell e0c62c5eda Add make_stream_public endpoint.
(imported from commit 03d4cff5587d0aa149997f2f6ae28ec4ede95d7a)
2014-01-06 11:59:47 -05:00
Jessica McKellar 8091634814 Move sent_by_human check to a method on the Message class.
(imported from commit 2ef49051932f9633ad11130952591c5c5b147f12)
2013-12-31 16:42:38 -05:00
Jessica McKellar 61103d8349 digest: On an app server, only send digest emails for domains it manages.
(imported from commit 9aea636a19eb6fdefacdc7dc393bf075a05862c5)
2013-12-20 12:50:23 -05:00
Tim Abbott 2264a07c03 Update server-side app checks to handle the new app names.
(imported from commit da7b2c06b413add1881b2d80a89794d0db9c810f)
2013-12-19 17:21:26 -05:00
Jessica McKellar 0d7ea7353f Don't show broken images in digest and missed PMs emails.
(imported from commit 92297b4c8f020e30b5c00e93bf32df6e19069dd8)
2013-12-18 14:31:04 -05:00
Jessica McKellar 96ea91056e Support displaying emoji in digest and missed PM emails.
(imported from commit b440da2501ccb6dd95dc79c3fbce1e81b17c38f4)
2013-12-18 14:31:04 -05:00
Jessica McKellar 685830b66a Fix broken image links for missed PM and digest emails.
In plaintext e-mails these will be simple links.

In HTML e-mails these become a <link> and <img>, which some web mail
clients may inline.

(imported from commit b1242dfd917008a019981eb2224c1c7f5f84739f)
2013-12-13 16:38:11 -05:00
Jessica McKellar 67088b15a4 Sort messages before building a message list for emails.
Otherwise they sometimes appear out of order!

(imported from commit 26b71579b8f0c31ebdba0eef99afdf0e1772b676)
2013-12-13 16:38:09 -05:00
Jessica McKellar 35c2804c13 Use PM coloring for PMs in missed message emails.
Previously it used a blue header and white background for everything.

(imported from commit 03b8b0f8fb33a581d67a249f0496cc27aab30ef3)
2013-12-13 16:38:09 -05:00
acrefoot 1bd420f12c Show auto-scroll forever setting in /#settings
(imported from commit fa66cbe52836f230e551f25c47bd755b705387d2)
2013-12-13 11:50:11 -05:00
Tim Abbott 2e62cd5a74 Add tests for the events_register event application system.
(imported from commit 6c3dbe55d43f528b6a980bba3598ac30c0307a69)
2013-12-12 17:36:41 -05:00
Tim Abbott a3d67a7fe7 Fix apply_events for subscription events to actually match.
Since we changed the initial subscription data to include
user_profile_ids rather than emails, we need to preserve that when
adding in events generated during the page load.

(imported from commit 4f4071b8ba30e57c6f64c9e7b54c1cc754e8f010)
2013-12-12 17:36:40 -05:00
Tim Abbott 8af0fae335 Fix missing muted topics in apply_events.
These events would previously not be applied.

(imported from commit c3e5b9de559b6f744567a0c78e920d34e4d5ae9a)
2013-12-12 17:36:40 -05:00
Tim Abbott afdf7897e6 Split out helper functions from do_events_register.
(imported from commit d838a3303d3ec960d076e755fc8690da5151ac1a)
2013-12-12 17:36:40 -05:00
Tim Abbott 71ad82b6aa Add support for event queues with an included narrow.
This will allow us to substantially decrease the server-side work that
we do to support our Mirroring systems (since the personal mirrors can
request only messages that user sent) and also is what we need to
support a single-stream Zulip widget that we embed in webpages.

(imported from commit 055f2e9a523920719815181f8fdb44d3384e4a34)
2013-12-12 17:36:39 -05:00
Kevin Mehall 662edc2558 [manual] Backend support for Android GCM push notifications
This adds a dependency on gcmclient:
http://gcm-client.readthedocs.org/en/latest/gcmclient.html

pip install gcm-client

or

apt-get install python-gcm-client

(imported from commit 9f1fbf1f793e4a27baed85c6f1aa7a7b03106a10)
2013-12-11 15:37:48 -05:00
Kevin Mehall e4589700b6 [schema] Modify device token to support both iOS and Android
This replaces the AppleDeviceToken table with a generic
PushDeviceToken with a `kind` field to make it easier to add functionality
like per-device/per-stream settings that share code between Android and
iOS devices.

The schema must continue to work on prod with the old table name, so we
add the new table in parallel and can drop the old table once this code
hits prod and any necessary data is copied.

(imported from commit 0209a7013f2850ac6311f23c3d6f92c65ffd19e3)
2013-12-11 15:37:47 -05:00
acrefoot 33ddba3d30 extra debugging info for handle_push_notification
(imported from commit c4f63827fd37e7e99853380eaa268ab2e5ae23ce)
2013-12-09 11:15:20 -05:00
Leo Franchi f55067a3db Actually use a UserMessage object instead of Message
(imported from commit 9613af82f62a9ea85a85f1ce662234f410457997)
2013-12-06 15:53:42 -05:00
Leo Franchi 4f2cb1bc1c Read read flags from UserMessage not Message
(imported from commit 4c0f6ec90992c61ba861f5f347655673e769bebc)
2013-12-06 15:08:02 -05:00
Leo Franchi 1b53a77f1b Expect an ios client instead of iphone
(imported from commit d5d3cd129d7005fd9294096d3899df86155cd366)
2013-12-03 14:27:51 -05:00
Jessica McKellar 207cfc449d Add unsubscribe links to digest e-mails.
(imported from commit 4e2a324decf4bc694752cc24b9085361338a08a5)
2013-12-02 18:58:03 -05:00
acrefoot da1466cfa9 handle case of message getting read while processing missed_message
(imported from commit cd53efe3645f5dc8943becc2b8dbd3d607bb8eba)
2013-12-02 16:00:56 -05:00
acrefoot 717e06d94c remove log message on push notification
(imported from commit 45fc89e67a79aac3484c911d88aff3e470b4eff6)
2013-11-27 18:00:33 -05:00
acrefoot 8ee7536012 Send push notifications more aggresively
Unbundle the push notifications from the missed message queue processors
and handlers. This makes notifications more immediate, and sets things up
for better badge count handling, and possibly per-stream filtering.

(imported from commit 11840301751b0bbcb3a99848ff9868d9023b665b)
2013-11-27 18:00:31 -05:00
Jessica McKellar 2ba9415178 Factor welcome e-mail enqueuing into its own function.
(imported from commit 85054ee3e567d2ba7a4ed94c52a311d02f5e4d43)
2013-11-27 09:30:00 -05:00
Leo Franchi 501f063426 Replace email_to_domain with split_email_to_domain and resolve_email_to_domain
Now that we support email aliases, we have to be careful when going from
an email address to a domain that we assume we can use to get a Realm
object for. When we care about the Realm's domain, we want to follow
any RealmAliases that exist for a certain domain.

When we just care about the original email address domain itself,
for comparison or other purposes, use split_email_from_domain

This removes the ambiguity of having to decide when to use
email_to_domain + RealmAlias or just email_to_domain

(imported from commit 0e199495502d946ce2e1aae56263e7e8665be4ed)
2013-11-26 10:45:01 -05:00
Jessica McKellar dbc1b4b501 Add a one-click unsubscribe link to missed message e-mails.
(imported from commit 719eb61c9b7722eb1b0996b4d5f2f8f5929ad701)
2013-11-25 15:18:40 -05:00
Tim Abbott 7cb261a0ed Set default streams to engineering,social when creating realms.
(imported from commit 4e174fec162be4138da099edfc4cfb8d5662b7f1)
2013-11-25 14:00:28 -05:00
acrefoot 4cd1d69ea0 Add the ability to unsubscribe all users from a stream
This resolves Trac #2022

(imported from commit 23d5129a6bec40c33eaf71953cd41ec387646a39)
2013-11-22 17:12:51 -05:00
Jessica McKellar d0a49e3a80 Replace decentralized topic truncation with a single check when sending messages.
(imported from commit 291c999147dd59a9c7e1d9de446293755c17e99d)
2013-11-22 13:53:03 -05:00
Jessica McKellar baef4b9b00 Truncate long messages instead of rejecting them.
(imported from commit 41e0ce1e91ab7a441f2b21ad445344a86ae18fc7)
2013-11-22 13:53:03 -05:00
acrefoot 5973f20b69 fix use of EXTERNAL_URL to EXTERNAL_HOST, and some typos
(imported from commit 3e6e0f337671b289202bc86c6224854b6ee623c5)
2013-11-20 17:39:07 -05:00
Jessica McKellar 151fbd832c do_update_message: use is_admin to check who can edit a topic.
(imported from commit e96245506c7eecc8aed3fbdb6dfb7c44aca3234e)
2013-11-19 14:31:02 -05:00
Jessica McKellar 2c841042ae Allow admins to rename any topic.
(imported from commit 5b557e8244e5196c9aa0ee29d4efb00986434528)
2013-11-19 14:31:02 -05:00
Tim Abbott f3fa78d30c Rename do_[rd]activate to do_[rd]activate_user.
For similarity with do_activate_user.

(imported from commit 2874af84dbe1ce666de10e0d8ffe2daa8bad9731)
2013-11-16 11:35:26 -05:00
Steve Howell bdfd3ed9c2 Add do_reactivate() action.
(imported from commit fc73d0fdd3a6125b3b31a75c3b108ceb266e528b)
2013-11-16 11:35:25 -05:00
acrefoot daffe049ad Don't use hardcoded noreply@zulip.com, zulip@zulip.com, or https://zulip.com
(imported from commit 1132553b63ae23ebcca746f0f65205b97bfee7dc)
2013-11-15 21:31:37 -05:00
Jessica McKellar b0209fec05 Don't puke on non-ASCII characters when shelling out to html2text.
(imported from commit a407c9fb2a090075d5e26b5db00388f4f81de1f5)
2013-11-15 12:28:30 -05:00
acrefoot f991fbff9e Fix clear_followup_emails_queue on Zulip Enterprise.
(imported from commit bf211b205bc39a08340306d06fbb76479a02ed9e)
2013-11-14 11:32:29 -05:00
acrefoot b6751d2119 additional lowercase situations in clear_followup_emails
(imported from commit c0c031e7abb2a166636075596fb0d5ed21a5822c)
2013-11-13 17:53:37 -05:00
Jessica McKellar 338de6715d Fix broken html to markdown conversion on Linux.
(imported from commit 1b62d382e4f2b60972384a6b4b4173161ea58b73)
2013-11-13 17:47:28 -05:00
acrefoot f7b5a10da0 [schema] Add ScheduledJob table, and update mandrill related code
ScheduledJobs with type Email displace the usual mandrill codepaths
in the Zulip Enterprise deploys

* Email-specific helper functions will appear in deliver_email.py
* 0058_auto__add_scheduledjob.py

(imported from commit 8db08d8a279600322acfdbed792dc1a676f7a0ab)
2013-11-13 16:41:36 -05:00
Jessica McKellar 8382e074fe Move use of html2text to a subprocess call.
(imported from commit 36e8a6f030d75196c28fbdc0e58c6968952d95ff)
2013-11-13 16:28:29 -05:00
Jessica McKellar 5c0a624f9e Don't notify on stream messages by default for LevelUp.
(imported from commit c0c21047698612dbcee5eee9e858f37a8f8e29bd)
2013-11-13 16:14:36 -05:00