For a 4-person stream, we were hitting the DB 8 times, and 4 of
those queries were to lazily get user.email for the 4 recipients
due to upstream code using only(). I added user_profile__email
to the only() call.
I believe this regression started 9/18, and after pushing this
to prod, we would should look at this graph:
https://stats1.zulip.net/graphs/8274cd84588
(imported from commit 70629cb69fe5955c674ba76482609dfe78e5faaf)
This is useful in debugging when you just want to discard all the
messages in a queue because they have the wrong structure.
(imported from commit 8559ac74f11841430b4d0c801d5506ebcb74c3eb)
Instead of collapsing muted messages, just hide them altogether
in view where it makes sense to hide them.
(imported from commit 1c2c987ff302ceb135a025753cf421b4de1aea71)
Use stream.num_subscribers() in check_if_a_bot_is_sending_a_message_to_an_empty_stream().
The num_subscribers() function using Django's count() method, which returns
a single row, vs. len() on an iterator of query rows.
(imported from commit 6157fe248945e9288ee71d8cc39fb6dda4e9a247)
This tests that a bot's owner gets sent a message if the bot
sends a message to a stream with no subscribers. (Presumably
the message will be a PM; we could make the test more precise
in the future.)
(imported from commit 0aaf931a90cb9c7bc3fde8ac545c6b6ad0a55668)
This includes:
* Merging the pull request and issue subject creation functions
* Factoring out pull request and issue content creation
(imported from commit 9cf90e999482a1998431e6483788522101607167)
Some bots created by us do not have owners. Don't try to send a
message to the nonexistent owner.
(imported from commit ab952eccd7d6c4728e9477a106142214b5c81ca9)
Instead just rely on the 2-minute delay in the management command to
batch conversations.
We've had people report being confused or thinking the feature was
broken when they didn't get e-mails because of our rate-limiting, so
let's see if this is not too overwhelming.
(imported from commit 706ddb07b906b5c2edea1159c04acc2ee6f06e29)
Warn inside these functions when you get data on streams that you
are not subscribed to:
add_subscriber
remove_subscriber
user_is_subscribed
The back end should be smart enough not to spam us with subscriber
info that we don't care about.
(imported from commit b27644be2abc37c11ddff884ef392ea208bd1bd3)
Don't send peer_add notifications to users who are already
getting add notifications, because they will already know
about subscribers.
(imported from commit 726b54ae0e30b71440b17d9c51b026872ea96218)
It only grabs the user_profile_id column now. This leads to a
speedup of about 16x between grabbing large ORM objects vs.
small 1-column dictionaries.
(imported from commit 95150bff3fdcbe250b04f014062224af42a6644f)
Splitting out notify_peers() will give us flexibility for cleaning
up how we notify peers for bulk adds.
(imported from commit e108fa2c432cc1fe54d788c58c82c983e0f2394e)
If you expand subscribers on your settings page, you will now see
a query like this in your postgres logs:
SELECT "zerver_userprofile"."email"
FROM "zerver_subscription" INNER JOIN "zerver_recipient" ON ("zerver_subscription"."recipient_id" = "zerver_recipient"."id") INNER JOIN "zerver_userprofile" ON ("zerver_subscription"."user_profile_id" = "zerver_userprofile"."id") WHERE ("zerver_recipient"."type" = 2 AND "zerver_subscription"."active" = true AND "zerver_recipient"."type_id" = 40 AND "zerver_userprofile"."is_active" = true )
The join's still complicated, but the list of fields is one instead of 40+.
(imported from commit 48de1f888193a4d23fcea52d0b633d134e4a3ff7)
get_subscribers_backend() now calls the new get_subscriber_emails()
function, which just queries the email field:
"zerver_userprofile"."email"
...instead of querying about 40 fields that it never uses.
I was able to verify the query slimming by watching my postgres server log.
Also, you can verify that the ORM does roughly 16x less work using values():
>>> def f(): return [sub.user_profile.email for sub in list(Subscription.objects.all().select_related())]
...
>>> def g(): return [row['user_profile__email'] for row in list(Subscription.objects.all().values('user_profile__email'))]
...
>>> def timeit(func): t = time.time(); func(); return time.time() - t
...
>>> timeit(f)
0.045198917388916016
>>> timeit(g)
0.002752065658569336
(imported from commit a69f690a96d076b323fdfc2f4821b0548bdfac7f)
LinkPattern returned a string which contained a placeholder if the URL was
considered invalid. AtomicLinkPattern wrapped this in an AtomicString,
where the placeholder doesn't get removed properly.
m.group(0) is always incorrect because python-markdown modifies your regex
to include more than you specified (this is why part of the message got
duplicated).
(imported from commit 576bdf09c2b677cf4bc56484c363eb05f2110158)
* Remove the action from the topic and add the issue title
* Only show the issue body on open or reopen
(imported from commit f08eb40f36122d2498fe0c36a69df9e606296ff3)
We have to read the data anyway, and we don't have a convenient file
handle for uploads from attachments sent through the e-mail gateway.
(imported from commit 86260a4eaceef85c82707929a80558e11dc54ef6)
The get_status_dict_by_realm helper gets called whenever our
realm user_presences cache expires, and it used to query these fields:
"zerver_userpresence"."id", "zerver_userpresence"."user_profile_id", "zerver_userpresence"."client_id", "zerver_userpresence"."timestamp", "zerver_userpresence"."status", "zerver_userprofile"."id", "zerver_userprofile"."password", "zerver_userprofile"."last_login", "zerver_userprofile"."is_superuser", "zerver_userprofile"."email", "zerver_userprofile"."is_staff", "zerver_userprofile"."is_active", "zerver_userprofile"."is_bot", "zerver_userprofile"."date_joined", "zerver_userprofile"."bot_owner_id", "zerver_userprofile"."full_name", "zerver_userprofile"."short_name", "zerver_userprofile"."pointer", "zerver_userprofile"."last_pointer_updater", "zerver_userprofile"."realm_id", "zerver_userprofile"."api_key", "zerver_userprofile"."enable_desktop_notifications", "zerver_userprofile"."enable_sounds", "zerver_userprofile"."enter_sends", "zerver_userprofile"."enable_offline_email_notifications", "zerver_userprofile"."last_reminder", "zerver_userprofile"."rate_limits", "zerver_userprofile"."avatar_source", "zerver_userprofile"."tutorial_status", "zerver_userprofile"."onboarding_steps", "zerver_userprofile"."invites_granted", "zerver_userprofile"."invites_used", "zerver_userprofile"."alert_words", "zerver_userprofile"."muted_topics", "zerver_client"."id", "zerver_client"."name"
Now it queries just the fields it needs:
"zerver_client"."name", "zerver_userpresence"."status", "zerver_userpresence"."timestamp", "zerver_userprofile"."email" FROM "zerver_userpresence"
Also, get_status_dict_by_realm is now namespaced under UserPresence as a static method.
(imported from commit be1266844b6bd28b6c615594796713c026a850a1)
This function gets user presence information, which changes rapidly
and requires a pretty simple query.
(imported from commit f9b9f0f22277335c76eb4371930a4fff2758a240)
The do_send_messages() populates the user_presences data structure
for process_new_message(), so that Tornado code never needs to hit
the database or memcached to get the user presence info.
(imported from commit 194aeaead8fa712297a2ee8aff5aa773b92f1207)
This reduces the number of memcached calls we make in our time-
slice-limited tornado event handler.
(imported from commit 8903ce4ac754ba82d57e04d1b0356be7533edee2)
We create a blueslip error for undefined keys in Dict. This led
to a straightforward change in the unit tests for Dict. For the
unread test, to avoid the blueslip error, we had to be more specific
in setting up a user in one place, but this reduced our coverage,
leading to another small test being added.
(imported from commit 33e14795500d9283de2a7c03c4c58aec11cea4b8)
The exceptions were cryptic before, and they were inconsistent with
the fold_case: false behavior.
(imported from commit a40704d1a22bcdc60d91be832ee3c81eb416c6dd)
There was nothing to ensure that the changes resulting from scrolling
happened before the unread counts were checked. We already had a long
wait there; might as well do those checks after it to ensure that the
DOM is updated.
(imported from commit 0d4014ae6a74dd684521fecabefc4bf79015f842)
These engagement data will be useful both for making pretty graphs of
how addicted our users are as well as for allowing us to check whether
a new deployment is actually using the product or not.
This measures "number of minutes during which each user had checked
the app within the previous 15 minutes". It should correctly not
count server-initiated reloads.
It's possible that we should use something less aggressive than
mousemove; I'm a little torn on that because you really can check the
app for new messages without doing anything active.
This is somewhat tested but there are a few outstanding issues:
* Mobile apps don't report these data. It should be as easy as having
them send in update_active_status queries with new_user_input=true.
* The semantics of this should be better documented (e.g. the
management script should print out the spec above)x.
(imported from commit ec8b2dc96b180e1951df00490707ae916887178e)
The test will fail if a new attribute is added to the structure that
gather_subscriptions() returns. It should only be concerned with the
subscription's color.
(imported from commit fd5bad97bbce2544e0078ee029f54d4e45da9c15)
We found that since bugdown processes are threaded, the cost of
doing a db query in a markdown processor is quite high---each
thread must start up a new db connection including a SSL handshake
etc. We should strive to keep our rendering pipeline free of mandatory
DB queries.
(imported from commit 555066bd03da6c681b74ce6137acc264eb41c55d)
It is triggered by specifying the "language" of a code block to
"quote" or "quoted":
Hamlet said:
~~~ quote
To be or **not** to be.
That is the question
~~~
(imported from commit 847a0602e335e9f2955e32d9955adf8ac8de068c)
The new version is more accurate (doesn't rely on UserMessage IDs
being sorted, which they aren't necessarily) and simpler.
(imported from commit 671dd89dc8881ae2dcb8d0e804fd65458e074a29)
This will allow mail with an implicit destination (mailing lists, complex
forwarding) to be received by our system.
See http://support.google.com/a/bin/answer.py?hl=en&answer=2368151 for
documentation of Google's behaviour that adds this header.
(imported from commit f8fd500e3c27e12af5941c63c91d5c796a2cd24a)
Previously the email gateway had to be the only address in a recipient
field or we'd mis-parse the recipient.
This commit also makes the mirror correctly handle addresses of the
form "Jessica McKellar <jesstess@zulip.com>".
(imported from commit 7435f2b59b8f47dc599cc869f64597a730af7d12)
The mirror will use INBOX when deployed and Test locally. Send an
e-mail to the Test mailbox by including the word "localhost" in the
subject; a GMail filter will place it in Test on receipt.
(imported from commit bacf9a9554c8c5e1f3ec8497761edf2c15d3745d)
Previously, when added to an invite-only stream, you got notifications
like this:
Hi there! We thought you'd like to know that Some Person just subscribed
you to the invite-only stream 'Secret stuff'
You can see historical content on a non-invite-only stream by narrowing
to it.
Note that the second line is irrelevant and confusing in light of the
first!
This commit leaves this out, and also, to make sure I didn't mess
anything up (and because I needed to change the tests anyway), adds a
test for invite-only stream notifications.
(imported from commit 49c333629c78fc06f6d2f1ec8a627c6d38e7716a)
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)
An important part of this is updating the various caches that cache
the display_recipient.
(imported from commit 888bf54fd205516cf31a25ba3f4e45ad11bbd4d5)
This cache was created to make recipient lookups within a single
request (e.g. when fetching old messages) cheaper. To support stream
name changes, we need to invalidate this cache on every request so
that users get a consistent view of the name change.
(imported from commit 801051b9f6a108c1f50be7eca9a1242d661919b1)
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)
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)
This is experimental, for staging only. There might be a better
way to model this than dueling force_expand/force_collapse flags,
but it works for now. The code in collapse_recipient_group()
could also be DRYed up relative to expand_summary_row().
(imported from commit 107151d1ecd640970fb7700d41278a003bd1abaa)
I believe the test data to be incorrect, but we'll find out when
we've captured some real data.
(imported from commit ae32af0436b6273d0b2a60b2c55047aace6adcad)
I was saying bar.d in places where I wasn't really specifically
testing the .d feature, and it was distracting and just an
unintentional consequence of copy/paste.
(imported from commit 7b137b28cb33c72b83f02fe1d2961c5c6accc263)
This change will allow us to test the muting feature on
staging. Any topic named "muted" will automatically be
muted. You can also mute any other topic on the console:
muting.mute_topic('devel', 'ios');
current_msg_list.rerender();
More UI around this experiment will be coming soon, as well
as support for muting entire streams.
The muting module keeps track of which topics are muted, but a
user can expand muted messages, and once that happens, the
messages are marked with the "force_expand" flag that gets
persisted to the back end.
Muted messages are rendered in similar fashion to the summarized
rows, and as part of unifying some of that code, we have
made it so that expanding a summarized section doesn't remove
individual flags related to summaries; instead, the messages
get the force_expand flag set.
(imported from commit acee4190e63813d46850415c41ff8ebfae4a6953)
I regressed this recently, thinking that all our operators are
strings, but I forgot about the "near:" operator used in the
"Narrow messages around this time" feature. The user facing
symptom was that the search bar showed up empty instead
of saying near:50, which might actually be the better
behavior, but it certainly was not intentional. :)
(imported from commit fcb93cecbe9a052bb9bc1af7fcac5aecaba5aafb)
I'm trying to move well-isolated methods out of narrow.js, so that
narrow.js is more strongly focused on UI/ajax interactions and
big, heavy lifting stuff. The logical home for parse/unparse
seemed to be Filter, and they brought along two private methods
with them. The big code moves involved trivial follow ups
like s/exports/Filter/.
(imported from commit ace0fe5aa1c7abce0334d079ba9eb8d9a57bd10f)
This is hard to break up into separate commits; sorry about that.
Before this commit we had 3 tests:
1. Claims to check that an unread count was 3, but actually doesn't.
2. Checks that scrolling down causes the left-sidebar stream unread
count to decrease.
3. Claims to check that unread counts are correct, but actually doesn't.
From talking to Leo, it seems that he originally tried to actually do
what tests 1 and 3 claim to do, but found it too fragile to check an
exact unread count because of font sizes, layout, etc.
We now have 4 tests. For each of the stream sidebar and user sidebar, we
test that:
1. Scrolling down causes the unread count to decrease
2. Logging out and back in again leaves the unread count unchanged
I've removed the two bogus tests and some other code that didn't seem to
serve a purpose.
(imported from commit 9f8e4b521e2765099510426d0b7e2960885e6f19)
You used to have to call casper.test.done(N) where N was the number of
tests run. This is no longer required and is deprecated in CasperJS 1.1.
(imported from commit 0de9ecb1930cbce416fa02c24a882e926cdc8e87)
Have ui.set_presence_list() only touch the presence list.
Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.
(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
Previously it only provided the list of all public streams; now it
allows one to specify any union of some of the following:
* all public streams
* all streams the user subscribed to
(the most relevant being the union of those two, which is what we want
for the "streams" page).
Or:
* all streams in realm (superuser only)
The manual task required is that when this is pushed to prod, we need
to also deploy the new sync-public-streams version to zmirror.
(imported from commit 27848b8bd136e2777f399b7d05b2fdcec35e4e21)
Github's documentation is a little unclear on what data is actually
sent and in some cases conflicts with the examples in the
github-services repo. The hope here is to capture a good sample of
different events to develop against and then use it in testing.
(imported from commit 356935894b87ca21591f5682c15f9ed27289a5b6)
The functions add_dependencies() and set_global() are convenience
methods that allow you to modify the global namespace while
the current file is running but then have it be cleaned up
by index.js when you're done.
(imported from commit f75b8a10c19f773a8d2d3a8fa4bc39b1679566fe)
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)
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)
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)
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)
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)
The function narrow.unparse() is used in a bunch of places in
the search suggestion code, and now it no longer lower cases
operands. This change contributes to fixing trac #1659.
(imported from commit 6b44b8a818482b5c8b4f9a45bc7d3a9d21e04eba)
Streams are converted to their "official" names now.
Topics are not canonicalized at all.
All other operands continue to be lowercased.
Since we don't lowercase stream/topic at the parsing stage,
we have to modify the predicate function to do the lowercasing
of stream/topic to enable case-insensitive comparisons. This
is slightly more expensive. The server-side predicate
functions are already case-insensitive.
(imported from commit 286f118c6c3ff9d23b37c7f958cab4c0eacd5feb)
If we have a stream named "Denmark" and we're narrowed to it,
then use "Denmark" as the default stream name in the compose box
even if the narrow operators are lowercase.
(imported from commit e9f06b7307c73231aa887dc95849e0307984e6f0)
This function returns the stream's actual name, if we can get it;
otherwise, it's the identity function.
(imported from commit 7a981adba9632d6c6eba54cb6514a9226d1e83e8)
There are no functional changes; you can still use the shell script
tools/test-js-with-node. It just delegates now to the new index.js to
iterate through all the other .js files in the test directory and run
them. This sets the stage for Istanbul to correctly compute test
coverage.
(imported from commit 6f521c78b7a314d010fa113f9c2c971ab999b637)
Trac #1716
Fix the tests to use real message IDs for the pointer. One helper didn't
use the pointer ID it was passed at all, so the test didn't actually test
what it was supposed to before.
(imported from commit 457bcdb04a6c3873e224b68cd9d79c9a26612010)
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)
This solves the problem of restoring a tab taking you to the previous
load's initial pointer position.
(imported from commit e5e988af65966b15a9d091064b65f87be3f0d75a)
For now, just do this, and we'll reach out to realms having trouble
manually. We may eventually need to automatically reply to the e-mail,
reach out to a realm admin, etc.
(imported from commit 5c5ac354066f9e9be3fb928e1f8801613c22c1ac)
We do this because the upcoming Bitbucket webhook does not send
enough information for us to send a useful message for deleted
branches or force-pushes.
(imported from commit dcac675f47e10672125caabd6fefa8dc0dc9c86c)
This otherwise causes Unicode bugs. See for example:
>>> import urllib
>>> urllib.quote_plus("hello&world+whats@up?")
'hello%26world%2Bwhats%40up%3F'
>>> urllib.quote_plus(u"faraoné")
/usr/lib/python2.7/urllib.py:1268: UnicodeWarning: Unicode equal
comparison failed to convert both arguments to Unicode - interpreting
them as being unequal
return ''.join(map(quoter, s))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/urllib.py", line 1275, in quote_plus
return quote(s, safe)
File "/usr/lib/python2.7/urllib.py", line 1268, in quote
return ''.join(map(quoter, s))
KeyError: u'\xe9'
>>> urllib.quote_plus(u"faraoné".encode("utf-8"))
'faraon%C3%A9'
(imported from commit 7c13b749bdc7f89e7b767ddd630be0ebce30802c)
Dict.each() allows to iterate through values and keys of a Dict.
The callback function is passed value as the first parameter to
be similar to _.each()'s calling sequence.
(imported from commit e745e8b5d2f167b8b8acf7542b767494e354b037)
This commit CANNOT be deployed until the previous schema change
([schema] models: add an email_token field to Streams) is on prod.
Before applying this schema change, run the populate-stream-tokens
management command to generate tokens for streams that need them.
(imported from commit 7adc81c8c317ec5d59dd59ba42a4dc1a46174007)
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)
We now show a list of users and allow you to deactivate a user using the
same process as `python manage.py deactivate_user`.
We add a new menu item accessible from the gear icon which will eventually
have much more than just this, but we have a good start here.
Here we also add a property to UserProfile which determines whether you're
eligible to access the administration panel, and then have code which shows
the menu option if so.
This introduces a new JS file, admin.js.
(imported from commit 52296fdedb46b4f32d541df43022ffccfb277297)
Previously, we'd determine unread counts client-side as messages got
loaded, which meant:
a) how many unread messages you were known to have kept changing
b) you could bankrupt yourself and then get the bankruptcy message
again as more messages arrived from the server
(imported from commit 90f1af27b493c720f77d37487d8746749faf157e)
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)
We add a new validator that ensures that people who sign up with @mit.edu
addresses are in fact MIT users.
This closes#1612.
(imported from commit 1e30794b1615dd57cb0e367d1fa186a877253357)
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)
This was previously causing us to generate a traceback every time we
hit a duplicated zephyr due to CC'ing.
(imported from commit 240e1559655d0166dcd864e84649ab97b87a29ad)
1) The class Filter now lives in its own module.
2) The function canonicalized_operators() is now a class method on Filter.
3) The function message_in_home moved to filter.js and became private.
4) Various calling code had to change, of course.
5) Splitting out Filter helped simplify a few tests.
(imported from commit e41d792b46d3d6a30d3bd03db0419f129d0a2a7b)
This is an experiment to try to ease the customer3 onboarding process
given that there will be a website with a public feed of recent Zulip
messages, to ensure that those messages appear for new users.
(imported from commit 31fb59c1800728b5e4d8a5ce7282c7dcedb02b21)
This if statement stopped working when we made the pointer managed via
the events system.
(imported from commit 382ca5bd055ab85048b211068ff3d43a47607f28)
There are also one or two places we don't need to use it for security
purposes, but we do so for consistencey.
(imported from commit aa111f5a22a0e8597ec3cf8504adae66d5fb6768)
util.enforce_arity takes a function and returns a new version which
throws an error if an incorrect number of arguments (as determined by
the function prototype) are passed.
(imported from commit 20e69a6dc7b6f8455726ab4fae8d5b7b04dc4103)
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)
The main changes are:
(1) Changing the input format for the example response so that it is
human-readable and editable
(2) Updating it to use the events API
(imported from commit 308fade9595d6877836d343d2307e3fceff3e7d4)
The e-mail forwarder will use this. Set it to nullable temporarily to
accomodate existing streams; later commits will a) provide a script to
give all streams a token, and b) make the field non-null.
Realm administrators will eventually have a UI to regenerate stream
tokens.
(imported from commit a084d0a7012eb9665e4da095cbc46aa9ef354eaa)
The test-all script now calls the symlink, and the run script
has been cleaned up to be symlink friendly.
(imported from commit 8abb5c1e5744416e94ff843e50c53e0d0f7e1316)
This fixes trac #1660. A deactivated user may still have the
active flag set to "true" on their subscriptions, but this is
just to help future reactivations; they are not actually
valid subscribers while deactivated, so we add UserProfile.is_active
to our filter in the query in get_subscribers_backend().
(imported from commit 8598b2e180faea618371293e42b794898e645004)
We need to be able to let a user through if they are trying to sign up
for a completely open realm like CUSTOMER3.
(imported from commit 1e33ab0ce94545f217739d501e9227dfb48e1123)
It will have new callers soon and that's as fine a place as any to
avoid circular imports.
(imported from commit 089a724e9ad06cb5a51ffe80f1729d789238e5f6)
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)
When you read messages in a narrow and then un-narrow, collapse
adjacent messages read in the narrow into a summary row that can
be clicked to expand those messages.
Scoped to staging with feature flags.
The implementation of this within our current MessageList is rather ugly.
(imported from commit bcb3a39d8c0c334136fe86318f18ead03f0f50bf)
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)
If you entered "stream:Denmark " in the search box, we would show
you two suggestions for "stream Denmark", despite our duplicate
detection, because we didn't canonicalize the suggestion that is
literally based off the user typed query, and so the other way
of generating the "stream Denmark" suggestion created a duplicate.
Now all the suggestions we generate are canonicalized, so the
generalized duplicate detection can work.
(imported from commit 52bf08ccf9bb2e2260ca8c20690169aead3732ab)
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)