Commit Graph

590 Commits

Author SHA1 Message Date
Tim Abbott 37bff5974c Add reactivate button after deactivating a user.
(imported from commit e2ae5692d0ba5237cf5a42c29ed44d9782128110)
2013-11-16 11:35:25 -05:00
Steve Howell f5093ddc50 Clean up admin_user_list.handlebars.
The inactive flag wasn't really supported, and the
activation_toggle_button class was misleading, since
we don't yet toggle in both directions.

(imported from commit 0c8511021dd580c86df4e80092a6dd49e32773f9)
2013-11-16 11:35:25 -05:00
Steve Howell edeb3263c1 Add bots to admin page (and sort humans/bots by name).
(imported from commit 8a13702b427155b5f4f5102d79ef434e98035600)
2013-11-16 11:35:25 -05:00
Steve Howell aa87335c7f Remove dead code in admin.js.
We had people_list-related code left over from before we
started using realm_people_dict.

(imported from commit f77c441269f07db2a8998c2184de81f9d0c053d6)
2013-11-16 11:35:25 -05:00
Jeff Arnold d0622e796c Simplify the UI by removing the user's own name and avatar
(imported from commit 60d6ff1d677e3efe31e68df2c4387ddd2bd8084d)
2013-11-15 18:48:51 -05:00
Leo Franchi 593485e753 Expose hooks for file upload UI control for desktop app
(imported from commit c196363a411e0a9c499d9bb694ab539f2ab0e365)
2013-11-15 14:42:31 -05:00
Leo Franchi 7f2936a985 Allow enterprise customers to disable name changes
(imported from commit 1f2039f3e88a4ec0cc48dba75f714563c1de4af8)
2013-11-15 11:26:10 -05:00
Zev Benjamin 878916d301 blueslip: Fix formating of log date strings
We weren't padding the parts of the time or date.

(imported from commit 6ce68670f603b58592904ddc1f4be820dda135c3)
2013-11-15 11:00:56 -05:00
Steve Howell 53e3435a77 [customer] Enable single message narrowing for CUSTOMER10.
(imported from commit 2734315a3b7bd0a872048406b886d197c3c3cad6)
2013-11-15 10:46:15 -05:00
Steve Howell 788943887a Resize GROUP PMs more aggressively.
(imported from commit fbef79f2bb544648fcf4ea26e25354a7ed6912df)
2013-11-14 20:33:50 -05:00
Steve Howell 2074573fe2 Make sure GROUP PMs show up without needing a resize.
(imported from commit 6c6d79fdd5dfe15e508c430baef5043d9d1d2c93)
2013-11-14 16:30:57 -05:00
Zev Benjamin 4d7b351b07 Ensure that restarting get_events does spawn more than one get_events request
Aborting a xhr actually calls the error callback, which was
restarting the get_events loop, and we were also restarting it
manually in restart_get_updates.

(imported from commit dcdb4a27539ce35ecd83c2ade5b4edca3fb848e1)
2013-11-14 14:44:37 -05:00
Steve Howell d3579c57ec Avoid scrolling the main page by accident with mousewheel.
If you used the mousewheel in certain page sub-elements, scrolling
to the bottom would sometimes turn into scrolling the main page.
We had code to make that not happen, but it was sensitive to
integer rounding, so I added a one pixel fudge factor.

(imported from commit 5ed1f4e717e5f9ce3316383812dee27913afdd49)
2013-11-14 14:29:31 -05:00
Steve Howell 3a7113312c Give some room to GROUP PMs when lots of users.
When GROUP PMs are in the right sidebar, and when there are
lots of users, we set max heights so that both USERS and
GROUP PMs show up.

(imported from commit 4a5a16a8cf03d853769b3a690ac5b0338a2c8461)
2013-11-14 14:29:30 -05:00
Steve Howell b7d8f5d43f Move groups (not just users) from right to left sidebar.
When a user squishes the browser window enough to move users
to the left sidebar, we need to move user groups as well.  More
importantly, when they widen again, we move both of them back
in a way that users stay on top of groups.

(imported from commit d80722b58190d42a2dfc5247bfffaa7708cde21a)
2013-11-14 14:29:30 -05:00
Steve Howell a2df5f18e9 Add expectOne() checks for sidebar logic.
(imported from commit b9e729fd37f291d9e3f17edf77117d71fd129f7c)
2013-11-14 14:29:29 -05:00
Allen Rabinovich ca4e6a0ff8 Updates to stream list
(imported from commit 426a8035e9661598f9bbfa6ae83883ca3ac6106e)
2013-11-13 14:59:07 -08:00
acrefoot 9e50781131 Random javascript shortenings
(imported from commit 68a34d67ac38e34035a3e3986518824bf5a96fc5)
2013-11-13 16:41:36 -05:00
Tim Abbott c70adde1cd Send users whose sessions have expired to the login page.
(imported from commit 9ffdc414b9a0874d2cd6f7a4f91596b82390ab38)
2013-11-13 15:35:45 -05:00
Tim Abbott 3dadb5b76a Update comments to rename Local Server => Enterprise.
(imported from commit 82bf89aa1148a78ce11ead203a0bc16243d1fca8)
2013-11-12 15:57:02 -05:00
Tim Abbott 5293cdebe8 Rename LOCAL_SERVER to ENTERPRISE.
(imported from commit 7edf353eefe6c9e7aac74b7bbc37b923cac1b913)
2013-11-12 15:57:01 -05:00
Zev Benjamin 3f0fa363f9 Add explanatory comment
Leo and I were looking over this code and I couldn't remember what it
was doing.  So after I re-derived its purpose, we figured that an
explanatory comment was in order.

(imported from commit ce984362e2b504b40f3d3586777bd73691ad5ea7)
2013-11-12 15:32:09 -05:00
Zev Benjamin 279b52b0f8 socket: Don't generate an error for duplicate responses
(imported from commit abb789f9a3ab97160420bee5955a9033142c31f4)
2013-11-12 15:24:30 -05:00
Steve Howell 56c39728ba Support /me syntax.
If a user types "/me runs to the store", we put "runs to the store"
in bold after their name.

(imported from commit fbc11e99244e1c8fa1c03e4753e706957fcd449e)
2013-11-12 10:49:10 -05:00
Kevin Mehall 59757b37e2 Get user API key without password when SSO is the only login option
(imported from commit 195ff68cc54cd2e7d200702c699bb3a258d3e868)
2013-11-12 10:37:33 -05:00
Kevin Mehall 4a6b7cb20b Disable password change when SSO is the only login option
(imported from commit fd1a14237e2d6ea574331ed178bfc0db5beb18c6)
2013-11-12 10:37:33 -05:00
Steve Howell b2109722be Enable show_huddles for CUSTOMER4.
(imported from commit 27c2174a002cc1cef58ec53cd1c0c00d3fc7d6b4)
2013-11-09 09:35:38 -05:00
Steve Howell d311ab0283 Avoid stack trace when hitting "i" to close message menu.
The function show_actions_popover() actually toggles the
message action menu open and closed.  I renamed the method
to toggle_actions_popover(), and I check to make sure the
menu is open before trying to focus its first item.

(imported from commit b2c32b6c4e0be6066cd1d41463457b7e991df0ec)
2013-11-08 12:28:22 -05:00
Steve Howell 62089aeff6 Make sure unread counts stick for huddles.
Every time we re-render the huddles section, we need to
update the unread count.  We do this is in very similar
fashion to how we update individual users.

(imported from commit 2419365bc602ddaebc609090e119c0dcfad35bb7)
2013-11-08 12:11:28 -05:00
Steve Howell 038460bd26 Select the first menu item when using the "i" hotkey.
If you use the "i" hotkey to open the message menu, focus
the first item in the menu.

(imported from commit 54069710134c64368220ab0cf9144c3dc1a4304d)
2013-11-08 10:44:21 -05:00
Steve Howell bb3eca70c7 Allow enter key to submit an alert word.
This fixes a mild regression in 6bd2a0315ff56a20027074d65ccaa094bd35e63f,
which fixed a bigger bug.  That change added the event parameter to
add_alert_word(); this change updates one of the callers to now
supply it.

(imported from commit c6375abb8bd22d12c538cd7439462aae4665ee38)
2013-11-08 10:36:37 -05:00
Steve Howell 52ec258122 [staging only] Show Recent Group PMs in right sidebar.
Show up to 10 of your recent group PM conversations in the right
sidebar.  Clicking on the links narrows to the huddle and opens the
compose box for the huddle.  The green circles have opacity
proportional to the number of users present in the huddle.

This is feature flagged to staging only.

Some of this code was written by Allen before commits were squashed.

Known issue: unread counts disappear on certain refresh events.

(imported from commit 3b44665150ba20594d8b0295cb30df03601c1d52)
2013-11-07 16:54:13 -05:00
Steve Howell 7bde1f7716 Add activity.short_huddle_name().
(imported from commit e3f0389298631fd06169dbc9559691470ac19d00)
2013-11-07 16:54:13 -05:00
Steve Howell 9adcba1e6d Add activity.huddle_fraction_present().
Add a method that lets us know what percentage of a huddle is
present.  (We can use this later to set the opacity of huddles
in the UI.)

(imported from commit 8a2383951807d7bfbf9d730a8980d977cf23b379)
2013-11-07 16:54:13 -05:00
Tim Abbott 1a97f194e9 compose: restart the get_updates loop 2s after sending a message.
This should substantially mitigate the get_updates failures that we've
been seeing, since users will experience a 2s-slow send, not a 0-60
second slow send.

We should revert this once we resolve the root problem.

(imported from commit b665d0dfe674e1113bdd62cef50e3d9c52758e4c)
2013-11-07 15:30:05 -05:00
Zev Benjamin b715e15d3d Fix blueslip not outputting to the console
(imported from commit ffb96548b8262881ae731b627b510f208b3b93dc)
2013-11-07 14:23:16 -05:00
Jessica McKellar 07959dc6d9 alert words: fix accidental use of a global variable.
The global in question was `event`, set to:

MouseEvent {dataTransfer: null,
            toElement: button.btn btn-mini add-alert-word,
            fromElement: null, y: 442, x: 763…}

in Chrome. This does seem to be the correct event.

In Chrome, this global variable existed, so the code path didn't error
out. In Firefox, the global variable didn't exist, causing adding
alert words to fail.

(imported from commit 6bd2a0315ff56a20027074d65ccaa094bd35e63f)
2013-11-07 11:50:01 -05:00
Zev Benjamin 24ae5998e5 socket: Request the status of pending requests on reconnect
This will hopefully help with the send dialog being stuck on
"sending" as well as allowing us to not show errors to the user on
reconnect.

(imported from commit 31ee889853f348e486863073dc130cdfb4e1338d)
2013-11-07 11:43:34 -05:00
Zev Benjamin 87fc182645 socket: Move `req_id` parameter to top level of protocol payload
(imported from commit 271d84a0b44a2623bec290f64a83a0423698a1ef)
2013-11-07 11:43:34 -05:00
Zev Benjamin 4595143023 socket: Switch to client ids from connection ids
Clients can only have one connection at a time, anyway, so we can
just keep track of a client id, instead.  This makes reconnections
easier.

It's a little funny to use queue ids for the client id, but we know
they should exist by the time the client is connecting and they are
guaranteed to already be unique and authenticatable.  We will also
eventually be integrating the event system and the socket code closer
anyway.

(imported from commit 1f60e06fb16d31d6c121deafd493fb304d19a6c2)
2013-11-07 11:43:34 -05:00
Zev Benjamin b5c68371d0 socket: Don't even create the socket on prod
(imported from commit 1990d86618ae715c072b6b81672afd6f0e8f48fe)
2013-11-07 11:31:06 -05:00
Kevin Mehall ed31b110e3 Revert "Fix duplicated summary blocks when scrolling up."
This is unnecessary without summarization and has a performance
impact on scrolling.

This reverts commit 6270a33ff0fe98fc901b687ca533ef0ea127d052.

(imported from commit ac328a9fe344adfaf1cc1822cd58bc9178ae1a33)
2013-11-07 11:04:27 -05:00
Kevin Mehall d93c7545f6 Revert rendering window changes related to summarization
This reverts commit c10d9c1a0d23891acce88bf8d79866c08cb75681.
This reverts commit 9259a246946cd968a8725c38ff5ef2d4b4793717.

(imported from commit 50e9e0136c2487cc63d75ae2b78df0c70a1b0be1)
2013-11-07 11:04:27 -05:00
Tim Abbott d246189d98 Fix report_send_time check.
(imported from commit eeb2dd9cb0861a5eeea6254ab9d6a3d818fb2ebd)
2013-11-07 09:54:41 -05:00
Tim Abbott 4aa7ce3bd2 Also display the time until new work is scheduled after rendering.
(imported from commit 33562f105d5dd6ed81ca60d0517277d908ec2ffd)
2013-11-06 15:35:49 -05:00
Tim Abbott f670fdc717 logging: Also log the end-to-end receive time for messages we sent.
This is the amount of time between when it is sent, and when it is
rendered into the user's home view.

(imported from commit 468c28e77ba16c7256c359e90ab5aacf9d497585)
2013-11-06 15:35:49 -05:00
Tim Abbott 387dcc0da2 Rename send_times_data to send_times_log.
(imported from commit 4491f6028084ab8f7e230d2e49aec497a9112981)
2013-11-06 15:35:49 -05:00
Tim Abbott 66cb29e60e Don't do second-stage fading if the compose box was closed in between.
(imported from commit 4c8ad3befe845db9a640e73925bd0928d6943178)
2013-11-06 15:35:48 -05:00
Jessica McKellar fdb5863687 Allow alert words to be multi-word.
(imported from commit ccf8a387a25d079cf43ed335f6dc9debd70db75d)
2013-11-06 11:43:34 -05:00
Steve Howell 4fb4e04501 Add activity.full_huddle_name().
(imported from commit 304e47ac88d7497fcde49f448912a2e063dd0bd1)
2013-11-05 15:34:29 -05:00
Steve Howell 6d511486cb Add activity.process_loaded_messages() and get_huddles().
Activity.js now has the capability to track huddles that
come through in loaded messages and return them in reverse
chronological order by their most recent message.  Right
now this only connected to a unit test, not any production
code.

(imported from commit 59957086fa2e454e5711472df091f178217aed2b)
2013-11-05 15:34:28 -05:00
Steve Howell a4ff7320fb Remove unused presence_description "away" entry.
(imported from commit 46f377399335ca9757ee52ecd21d6679b52635ed)
2013-11-05 15:34:28 -05:00
Steve Howell 617b0a95d2 Short circuit MIT case earlier in update_users().
This can be squashed with the prior commit, which inlined this
MIT check into update_users() while trying to avoid other
complications.  After inlining the code, it's clear that we
don't need to call the sort_users() line of code for MIT users,
so I moved the MIT guard condition up.

(imported from commit fa5b52e14964ad595b34d40ce6c8450ea93726c5)
2013-11-05 15:34:27 -05:00
Steve Howell 7f3115fa53 Move set_presence_list from ui.js to activity.js.
Since ui.set_presence_list is only called from activity.js, I am
inlining the code into activity.update_users().  This also allows
us to move ui.presence_descriptions into activity.js, which
is the right home for presence-related things.

(imported from commit 0ff239275c544a86c14d517bc386d06726b81cd9)
2013-11-05 15:34:27 -05:00
Steve Howell 82fd0f2b52 Rename user_info -> presence_info inside activity.js.
The user_info var was mapping users to presence information, and
presence_info is a better name for it.  This change is partly tactical,
as it sets us up to inline ui.set_presence_list, which receives
user_list as presence_list and then has a completely different
variable called user_info.

By doing this pre-factoring, the next commit becomes just a pure
code move without more moving parts of renaming variables.

(imported from commit 4b015d19886b43d24905124eb37cd9dd317aa87b)
2013-11-05 15:34:26 -05:00
Kevin Mehall e82f11ed46 Fix a JS error introduced by the debug logging.
Narrow.activate was called without an options object in one
obscure location. I'm not sure how it's actually triggered,
since all searches seem to go through the typeahead path with
the "Search for x" option, but someone managed to do it.

(imported from commit 5e0e1bbe7570e5f6a654949547dc164e01125efa)
2013-11-05 15:07:24 -05:00
acrefoot e9bd56b5a0 Make topic edits propagate by default from message header form
(imported from commit 6adcce6ebf90b35e84316e9f079de4010a635f8b)
2013-11-05 12:46:59 -05:00
Tim Abbott 8853d86b17 Disable notifying on sending outside view for now.
It's somewhat buggy, and has thus been annoying our internal users, so
better to disable it until we can fix the bugs.

(imported from commit f981791d32d321b0cfe06b4a337e26ab48832bb3)
2013-11-04 18:32:34 -05:00
Tim Abbott 792b283dcd Report end-to-end sending times as experienced by clients.
This should help with determining the prevalence of slow sends as
experienced by users.

(imported from commit f00797679315c928af3c87ad8fdf0112f1dfa900)
2013-11-04 18:32:34 -05:00
Jeff Arnold 6483314f74 Only fade visible messages before rendering compose box
Partially addresses #1963

(imported from commit 0c941085ab6894e8e43015a116c49a5bdc674b5f)
2013-11-04 16:27:39 -05:00
Jeff Arnold a1c0590043 Eliminate useless code. You can't click into the box when it's closed.
(imported from commit 67268d7d156ffede2c9ab6a3ec94ab04c3876118)
2013-11-04 16:25:06 -05:00
Jessica McKellar 7e3035b2d9 Fix historical messages not getting their color updated on a color change.
Perhaps we should be checking based on an ID rather than the actual
text, but this fixes the proximal issue.

(imported from commit b125415c3a8356255b64c8e22733532491ea0065)
2013-11-04 10:44:55 -05:00
Jessica McKellar d43c01c911 Complete rebranding of 'in home view' to 'muting' the stream on the Streams page.
(imported from commit a56ef49eefedbcc1ae14ec8486dd3ca73bed1f43)
2013-11-04 10:29:38 -05:00
acrefoot 9af244a6bc fix narrowing bug introduced by composebox notifications
I switched narrow.by_subject and narrow.by_recipient to use the all_msg_list
instead of current_msg_list, since we wanted to be able to narrow to messages
specifically not in the current_msg_list. However, in searches which revealed
old messages outside the range of all_msg_list (which only has a single contiguous range),
this broke narrowing.

Let's use msg_metadata_cache instead.

(imported from commit 427f717484b4ae83d9bb4cc6e51ce17177d037fe)
2013-11-01 18:33:10 -04:00
Waseem Daher 4a29f1002d Disable summarization via feature flags.
(imported from commit 8176b5364ee0b9f4be7cfe9ce65f502dec116d15)
2013-11-01 13:59:41 -04:00
acrefoot 83d2fcaf58 above-composebox notifications only on zulip.com realm
(imported from commit edc86511adb168e648652ecea54f7ee4f16b47eb)
2013-11-01 12:34:39 -04:00
acrefoot 434b7ac120 Give Feedback in non-obvious cases for sent messages
Displays a notification above the composebox in cases where the message
is not visible (further down), or where it's outside the current narrow or search.

It also offers a link to the appropriate narrow when it makes sense, and offers
timetravel when appropriate. There is currently a bug with timetravel (and you can
see this when using the popover menu) that makes "narrow to messages around this time"
not work for muted messages.

This resolves Trac #1518.

(imported from commit 391ca0b9c07d91496f6585a4fd8e15723d1170e2)
2013-11-01 12:34:39 -04:00
Tim Abbott c5b0076ecf Rename humbug => zulip in audio files.
(imported from commit f297f1f9c8683d4e02e7a0c4ecf2182fc79b89f9)
2013-10-31 15:29:48 -04:00
Kevin Mehall 58f7138e07 Collect additional debug information for JS errors
(imported from commit 7c94ad118c2cd33e5b6eec4e27fd22dfa2d56909)
2013-10-31 13:18:43 -04:00
Jessica McKellar f1e90086f5 Remove the onboarding checklist.
Looking at the historical data, fewer than 50% of active users have
completed the checklist, which means that it is just persistent
clutter. We also have other better ways of encouraging people to send
traffic and get the apps now.

This commit removes both the frontend UI and backend work but leaves
the db row for now for the historical data.

(imported from commit e8f5780be37bbc75f794fb118e4dd41d8811f2bf)
2013-10-31 11:34:15 -04:00
Jessica McKellar 69481a0843 Remove 'All messages' sidebar link.
Nobody uses it, and it causes confusion. (How is it different from 'Home'?)

For now, leave in the ability to get to the narrow, although we may
ultimately want to do away with it as well.

(imported from commit 35b3f27e39c4de3391bc5571b32f7242a29f4cfa)
2013-10-31 10:38:49 -04:00
Zev Benjamin d5b7cfd21a Fix whitespace
(imported from commit 095ea8640a18560aae7bd5e045c4f68c96f96f73)
2013-10-30 15:52:35 -04:00
Zev Benjamin eb7fd1ba51 Add some front-end debugging changes
(imported from commit 21684b09100bc0a24372948a9417c973709c1be2)
2013-10-30 15:52:35 -04:00
Zev Benjamin 2e6b3131b5 blueslip: Add `debug()` method that logs to the in-memory log but not the console
(imported from commit 7ca312d89ad3ec26c955b846e98c94b2b84a397e)
2013-10-30 15:52:35 -04:00
Steve Howell 8449a74fdf Remove obsolete comments.
(imported from commit d360efebd5201129becd22cb547c6c1fd24ed918)
2013-10-29 10:59:42 -04:00
Steve Howell 7cf66b5bb8 Allow users to upload avatars on the Settings page.
We were using Gravatar for user avatars, but now users can
upload their avatars directly to Zulip, and we will store
their avatar for them.  This removes the old Gravatar-related
interface and polling code.

This commit does not attempt to update the avatars in
messages that have already been loaded, either for the user
making the change or other users.

(imported from commit 301dc48f96f83de0136c93de57055638c79e0961)
2013-10-29 10:59:41 -04:00
Steve Howell af6de2053e Give Notifications settings its own alert area.
(imported from commit 1d17b85f383862d1f37b5750af40aa8d9a1d8bf2)
2013-10-29 10:59:41 -04:00
Steve Howell 68942a8f3a Properly split up "Your Account" and "Notifications".
The "Your Account" and "Notifications" boxes on the Settings
page each had their own border and their own "Save changes"
button, but they were within the same form and sending to the
same back end point.

This commit creates a separate form and endpoint for each
of the two boxes.

(imported from commit 04d4d16938f20749a18d2c6887da3ed3cf21ef74)
2013-10-29 10:59:41 -04:00
Zev Benjamin 90d92814ca socket: Throttle reconnection attempts
Previously, if the user held down the enter button while the socket
was disconnected, the client would try to connect in a very tight
loop.  Now we throttle reconnection attempts to 1 per second.

(imported from commit 7b18260b992d5a34f3ea7925cf72b383f84bbabd)
2013-10-28 16:42:16 -04:00
Jeff Arnold 4b9981c333 Make clicking to the left or right of the compose box close it
Addresses #1819

(imported from commit 6d06283cb8a39107151ffc5ce5a85c1455e332f2)
2013-10-28 15:33:11 -04:00
Jeff Arnold 96b4103c80 On click, only focus the compose box if there's no selection
Addresses #4

(imported from commit 4a2400dd4ae95863f7408af1e3c0f058a516adb7)
2013-10-28 14:53:43 -04:00
Zev Benjamin 801305b8d1 Re-enable the use of sockjs in local dev instances
This reverts commit 0619867d7807f3bf48d317e7452026b1a497e0df.

(imported from commit fda4f9f21d146dd63312fb1cb374eccd36a1261b)
2013-10-28 14:30:53 -04:00
Zev Benjamin 32da8ecff4 socket: Immediately try to reconnect when the client attempts to send
If the user has a flaky connection, we might be in the backoff state
of attempting a reconnect.  But when the user regains connectivity
and tries to send, we want to send the message as soon as possible.

(imported from commit 3c5c8e9c3104ff7923258f73c9ab700548518d16)
2013-10-28 14:25:36 -04:00
Zev Benjamin 01835dca0f socket: Remove old requests
(imported from commit 75bc776e539a2f036ed486e99a6635c38f56cdcb)
2013-10-28 14:25:36 -04:00
Zev Benjamin 7abbf096de socket: Add a little more logging for debugging
(imported from commit fa227971afc47f74b4784d1466cf58fff3b68113)
2013-10-28 14:25:36 -04:00
Waseem Daher 1e6f3bb4cd Move 'unshare the love' flag into feature_flags.
All local_server JS stuff should ideally be controlled from
feature-flags so it's easy to see at a glance what's been done.

(imported from commit 45b1cdae382679d3fa3b5f02f67e8ab749a89a51)
2013-10-25 18:48:46 -04:00
Waseem Daher a56fe810b2 Hide "Share the love" for local server.
We leave the HTML in because it's harmless. (We could do a more
thorough expunge, but I don't see the point).

(imported from commit d3d68b0b2df96a9f3de73903b043c18bc6f77563)
2013-10-25 18:08:47 -04:00
Steve Howell 356b400500 Remove obsolete stream_data.all_subs().
(imported from commit 7542638ad5132ca382e5e461a76c58d141db532d)
2013-10-25 13:50:34 -04:00
Steve Howell 392197da28 Fix recent Streams page regression.
The Streams page should only show active public realms, even though
a user might have info about a "retired" stream in their browser.
I regressed this in 69b83d769 for "retired" streams.  A retired
stream is a stream that no longer has subscribers.  The bug
scenario here was that you could create a stream, regret it,
unsubscribe yourself, and then the stream never went away from
the Streams page.

This diff tries to be a little more explicit about building the
list of streams for the Streams page.  Basically you have two
sources:

    * Get only the subscribed streams from the internal
      data structures.

    * Get the unsubscribed streams by calling the back end
      for all public streams, and subtract out the subscribed
      streams.

I tested the following scenarios:

    normal stream with me: in Streams
    normal stream without me: in Streams
    my invite-only: in Streams
    their invite-only with me: in Streams
    their invite-only without me: not in Streams
    retired stream: not in Streams (but message colors are good)

See the email "custom query to get public stream names" for some
related discussion.

(imported from commit bc9224e68797b26b795399941117faa9d6858b39)
2013-10-25 13:50:34 -04:00
Steve Howell 20c18d905d Rename internal subscribed_streams() to exports.subscribed_subs().
I want to make subscribed_streams() external, but it conflicts with
a legacy name in the same module (stream_data.js), so I have to rename
it in the same commit.  The new name conforms better to the current
naming convention, which generally has functions returning objects
use "sub" in the name.

(imported from commit 9f1ed60772c649359a413257e0998857eab3603f)
2013-10-25 13:50:33 -04:00
Zev Benjamin 77a1ed967b Make the socket accessible externally for debuggging
(imported from commit 8f78d09edc05f8eed5f1a2d87643bdd7b7d9bec6)
2013-10-24 17:40:43 -04:00
Kevin Mehall 0a3a22cb3d Support authenticated upload URLs.
Trac #1734

This is implemented by bouncing uploaded file links through a view
that checks authentication and redirects to an expiring S3 URL.

This makes file uploads return a domain-relative URI. The client converts
this to an absolute URI when it's in the composebox, then back to relative
when it's submitted to the server.

We need the relative URI because the same message may be viewed across
{staging,www,zephyr}.zulip.com, which have different cookies.

(imported from commit 33acb2abaa3002325f389d5198fb20ee1b30f5fa)
2013-10-24 17:01:06 -04:00
Leo Franchi 05564ec0e2 [schema] Add a config option for enabling/disabling push notifications
(imported from commit 5649188cd5e0e4edb6e71559ec7d7fc5e92efaf8)
2013-10-24 14:54:30 -04:00
Leo Franchi 196706cc64 Use POST with method=PATCH when sending a bot edit
(imported from commit e6ee1631f0b37e66da5979a5fa6e6860d7f4d0b3)
2013-10-24 10:22:06 -04:00
Tim Abbott 934f8521e5 Don't display subscribe/unsubscribe notices in home view.
When we add starring of historical messages, they'll get added to the
home view (since we don't filter them out), which isn't a big deal --
but we don't want to make an inaccurate claim that the user subscribed
to this stream and then unsubscribed.

This should most properly be handled by filtering server-side, but at
the moment our lack of an index on UserMessage.flags makes that
impractical from a performance perspective.

(imported from commit 00751a5f9fc20e9da5c09914c11d1579f9e7398e)
2013-10-23 18:51:46 -04:00
Tim Abbott 52829efe52 Add tools for collecting data on message sending times.
Usage, on the javascript console:
> feature_flags.collect_send_times = true;
> compose.send_many_messages("test", "test", 3)
> compose.send_times_data
  [47, 99, 48]

(imported from commit a2a22eea9bb1bbe24a79ec0453c099dabfc61c19)
2013-10-23 14:05:01 -04:00
Zev Benjamin 724b8e6b8a Temporarily disable sockjs in local dev instances
This is just until we hack up run-dev.py to also start the message
sender worker.

(imported from commit 0619867d7807f3bf48d317e7452026b1a497e0df)
2013-10-23 11:31:35 -04:00
Allen Rabinovich 3a5276aa4e Settings page changes
Bug fixes

Small fix to integrations and api links

(imported from commit 5944b175fbe0fdc4fdb5ecb3cab4e333127ca353)
2013-10-22 23:28:46 -07:00
Zev Benjamin 286803660f Optionally log message send times on the client
(imported from commit 900a513496b7796173a7685a55b110b63024f574)
2013-10-22 18:45:11 -04:00
Zev Benjamin ac87d92138 Send messages using SockJS on staging
(imported from commit 812d20b1eab76eeb0d8fb92029fdb38d5faa9cce)
2013-10-22 18:45:11 -04:00