Tim Abbott  
		
	
	24f527cb59 
	
	
	home: Don't send /register response for spectators.  
		
			... 
			In very large communities, computing page_params can be quite
expensive. Because we've moved the homepage for communities with web
public streams enabled to be the Zulip app, and it's common for
automation to frequently poll the homepage of a Zulip organization,
we'd like to keep those homepages cheap (as the login pages are).
We address this by prototyping something we may end up wanting to do
anyway -- having the web application do a `POST /register` API call in
order to fetch most page_params, and merging those with the mostly
webapp configuration page_params that we leave in the / response for
convenience.
This exact implementation is messy in a few ways:
* We rely on the assumption that ui_init.initialize_everything happens
  before all code that needs to inspect the page_params properties we
  are fetching via /register. This is likely mostly true, but nothing
  in the implementation enforces it.
* The bundle of ~25 keys that are in page_params ideally would be
  considered individually, with some moved to the /register API
  response and perhaps others eliminated or namespaced inside a
  webapp_settings object.
* It's weird to have the spectators network sequence different that
  from logged-in users, and potentially a maintainability risk.
* We might be able to arrange that the initial `/` response be
  cacheable, now that we're no longer embedding our metadata inside
  it. We've made no effort to do that as of yet.
Despite those issues, this commit solves an immediate problem and will
give us helpful experience with a model closer to the one we'll want
in order to happily support a web client that can be run locally
against a production Zulip server's data.
Co-authored-by: Anders Kaseorg <anders@zulip.com > 
		
	 
 
		2022-05-05 15:20:46 -07:00 
	 
	
	
	
		  ..
	 
	
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-05 15:20:46 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-05 17:52:52 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-04 11:13:28 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-04 12:26:49 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-01-28 17:45:45 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-01 18:14:31 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-29 16:35:49 -07:00 
		 
	
		
	
		
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-28 12:57:42 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-26 12:58:28 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-28 12:57:42 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-13 16:06:05 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-02-18 11:29:48 -08:00 
		 
	
		
	
		
	
		
	
		
			
			
			
			
			
			2022-05-04 17:30:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-27 22:09:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-29 16:35:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 13:28:49 -07:00 
		 
	
		
	
		
	
		
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-07 21:35:00 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-08 15:01:36 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-04-28 10:47:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-01 18:14:31 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2022-04-06 14:27:20 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-20 13:31:37 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-01-18 13:24:02 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-22 15:05:02 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 14:07:18 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-05-05 13:48:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-05 13:48:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-29 16:35:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-27 22:09:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-18 14:48:31 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-24 10:50:00 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-15 18:00:35 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-24 12:48:57 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-02-17 12:56:33 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 14:27:20 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
	
		
	
		
			
			
			
			
			
			2022-04-29 16:35:49 -07:00 
		 
	
		
			
			
			
			
			
			2021-12-07 13:38:48 -08:00 
		 
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-28 12:57:42 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-31 11:25:09 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 14:27:20 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-17 15:24:46 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-05-04 09:56:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-04-06 16:51:15 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 16:51:15 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 16:51:15 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-03 10:13:24 -08:00 
		 
	
		
			
			
			
			
			
			2022-05-05 14:02:34 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-03 10:59:33 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-04 13:28:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-04-19 17:30:16 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-04-28 12:57:42 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 14:27:20 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-05 13:48:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-03 09:19:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-02-07 18:51:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-10 11:37:38 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-05-05 13:48:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-24 08:10:14 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 12:10:05 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-27 22:09:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-26 16:29:12 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 13:28:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-27 22:09:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:10:23 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:10:23 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-25 17:33:11 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-05 13:48:01 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-04 17:30:40 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-30 11:31:29 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-04-29 16:35:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-07 16:58:58 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:10:23 -07:00 
		 
	
		
			
			
			
			
			
			2022-05-04 17:12:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-10 15:11:06 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-06 14:27:20 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-22 16:29:36 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-27 22:09:10 -07:00 
		 
	
		
			
			
			
			
			
			2021-12-16 15:28:11 -08:00 
		 
	
		
			
			
			
			
			
			2022-03-01 18:14:31 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-01 14:52:06 -07:00 
		 
	
		
	
		
	
		
	
		
			
			
			
			
			
			2022-04-01 14:52:06 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-02-22 16:29:36 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-28 12:57:42 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:10:23 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-03-07 21:35:00 -08:00 
		 
	
		
			
			
			
			
			
			2022-04-06 16:51:15 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-04-28 12:53:46 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2022-01-24 15:54:21 -08:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-05-05 15:20:46 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-17 13:16:34 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-15 18:00:35 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-15 18:00:35 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-01-24 09:57:09 -08:00 
		 
	
		
			
			
			
			
			
			2022-02-22 16:29:36 -08:00 
		 
	
		
			
			
			
			
			
			2022-05-05 13:51:57 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-19 17:30:16 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 13:28:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 13:28:49 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-21 15:36:10 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-04-04 14:07:18 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-16 12:52:07 -07:00 
		 
	
		
			
			
			
			
			
			2022-03-07 16:58:58 -08:00