Steve Howell  
		
	
	f6c41a54b9 
	
	
	Avoid overwriting message.unread for message edits.  
		
			... 
			This fixes a bug where this used to happen:
    * Alice has not read a message
    * Bob edits the message
    * Alice immediately reads the message
    * Bob's edit arrives to Alice and sets her
      message status back to unread
Essentially, the root cause of the bug is that we update
message.unread for edits, possibly from stale data, even
though Alice has more current info about reading the message.
This is the final fix to that scenario.  There were some
aggravating factors that widened the race window which were
fixed in earlier commits.
Fixes  #6248  
		
	 
 
		2017-12-26 09:01:21 -05:00 
	 
	
	
	
		  ..
	 
	
	
		
			
			
			
			
			
			2017-12-14 07:16:56 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-13 14:44:28 -06:00 
		 
	
		
	
		
			
			
			
			
			
			2017-11-14 11:12:13 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-27 13:07:43 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-21 17:39:51 -08:00 
		 
	
		
			
			
			
			
			
			2017-09-26 14:00:51 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-12 14:03:36 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-18 10:12:33 -05:00 
		 
	
		
	
		
			
			
			
			
			
			2017-11-16 10:53:49 -08:00 
		 
	
		
			
			
			
			
			
			2017-06-15 10:08:31 -07:00 
		 
	
		
			
			
			
			
			
			2017-07-25 14:02:12 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
	
		
			
			
			
			
			
			2017-10-08 15:48:44 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-08 18:13:57 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-20 07:36:50 -05:00 
		 
	
		
			
			
			
			
			
			2017-10-26 09:52:42 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 12:53:40 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-10 04:10:18 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-20 07:36:50 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-01 07:17:30 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-11-28 12:53:40 -08:00 
		 
	
		
			
			
			
			
			
			2017-07-24 10:47:16 -07:00 
		 
	
		
			
			
			
			
			
			2017-06-13 12:45:40 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-20 13:07:40 -07:00 
		 
	
		
			
			
			
			
			
			2017-04-21 21:59:22 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-22 10:51:55 -05:00 
		 
	
		
			
			
			
			
			
			2017-05-11 17:23:53 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-11-09 09:49:20 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-28 10:38:33 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-18 10:22:18 -07:00 
		 
	
		
			
			
			
			
			
			2017-09-26 13:58:54 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-22 12:19:43 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-28 15:42:58 -08:00 
		 
	
		
			
			
			
			
			
			2017-07-27 14:16:57 -07:00 
		 
	
		
			
			
			
			
			
			2017-06-02 14:03:56 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-18 10:22:18 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-16 10:53:49 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-09-15 04:14:52 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-20 08:53:27 -05:00 
		 
	
		
			
			
			
			
			
			2017-10-30 18:29:29 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-19 17:46:36 -08:00 
		 
	
		
			
			
			
			
			
			2017-08-05 16:47:11 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-13 15:14:18 -06:00 
		 
	
		
			
			
			
			
			
			2017-11-01 13:26:40 -07:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2017-04-26 09:11:44 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-10-12 18:08:32 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-11-15 16:59:11 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-11 15:57:11 -07:00 
		 
	
		
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-08-01 08:58:56 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-18 10:22:18 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-17 17:41:21 -07:00 
		 
	
		
			
			
			
			
			
			2017-05-17 07:06:32 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-03 14:01:19 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-28 15:42:58 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-03 11:28:28 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-29 23:06:11 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-23 21:29:42 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-03 15:38:10 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-07 10:36:02 -08:00 
		 
	
		
			
			
			
			
			
			2017-06-01 08:05:37 +00:00 
		 
	
		
			
			
			
			
			
			2017-08-22 09:37:17 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 15:42:58 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-10-12 10:42:06 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-22 15:15:29 -05:00 
		 
	
		
	
		
			
			
			
			
			
			2017-09-14 07:20:52 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-16 10:53:49 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-18 21:55:43 -07:00 
		 
	
		
			
			
			
			
			
			2017-08-22 09:37:17 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-06 12:36:59 -07:00 
		 
	
		
			
			
			
			
			
			2017-08-22 12:50:54 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 15:42:58 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-06 12:36:59 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-17 22:05:56 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-29 23:06:11 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-11-07 09:52:20 -08:00 
		 
	
		
			
			
			
			
			
			2017-12-26 08:50:00 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-11 15:59:02 -06:00 
		 
	
		
			
			
			
			
			
			2017-07-21 13:29:27 -07:00 
		 
	
		
			
			
			
			
			
			2017-07-27 14:16:57 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-20 07:08:46 -05:00 
		 
	
		
			
			
			
			
			
			2017-09-30 09:11:18 -07:00 
		 
	
		
			
			
			
			
			
			2017-04-06 11:28:36 -07:00 
		 
	
		
			
			
			
			
			
			2017-09-29 17:58:41 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 12:53:40 -08:00 
		 
	
		
			
			
			
			
			
			2017-04-17 20:55:42 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-07 09:52:20 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-07 09:52:20 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-21 07:32:24 -08:00 
		 
	
		
			
			
			
			
			
			2017-07-27 14:16:57 -07:00 
		 
	
		
			
			
			
			
			
			2017-07-18 12:03:16 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-09 16:26:38 +01:00 
		 
	
		
			
			
			
			
			
			2017-12-13 14:16:07 -06:00 
		 
	
		
			
			
			
			
			
			2017-10-08 12:31:12 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-18 11:45:07 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-23 22:44:27 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-11 16:35:12 -08:00 
		 
	
		
			
			
			
			
			
			2017-05-29 11:24:46 -07:00 
		 
	
		
			
			
			
			
			
			2017-08-16 18:03:44 -07:00 
		 
	
		
			
			
			
			
			
			2017-09-15 00:22:59 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 10:07:11 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-28 15:42:58 -08:00 
		 
	
		
			
			
			
			
			
			2017-06-26 19:33:25 -04:00 
		 
	
		
			
			
			
			
			
			2017-12-18 10:12:33 -05:00 
		 
	
		
			
			
			
			
			
			2017-08-14 13:03:57 -07:00 
		 
	
		
			
			
			
			
			
			2017-08-08 17:07:09 -04:00 
		 
	
		
			
			
			
			
			
			2017-08-17 09:01:49 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-15 11:01:33 -08:00 
		 
	
		
			
			
			
			
			
			2017-10-20 10:08:17 -07:00 
		 
	
		
			
			
			
			
			
			2017-10-09 15:13:33 -07:00 
		 
	
		
			
			
			
			
			
			2017-12-13 14:39:53 -06:00 
		 
	
		
			
			
			
			
			
			2017-11-16 09:45:08 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-16 09:45:08 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-16 09:45:08 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-28 12:53:40 -08:00 
		 
	
		
			
			
			
			
			
			2017-11-13 13:08:15 +05:00 
		 
	
		
			
			
			
			
			
			2017-11-07 09:52:20 -08:00 
		 
	
		
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-08-17 23:30:41 -04:00 
		 
	
		
			
			
			
			
			
			2017-12-26 09:01:21 -05:00 
		 
	
		
			
			
			
			
			
			2017-10-27 10:21:36 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-28 12:53:40 -08:00 
		 
	
		
			
			
			
			
			
			2017-08-16 16:23:41 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-29 09:36:04 -08:00 
		 
	
		
			
			
			
			
			
			2017-07-04 13:54:33 -07:00 
		 
	
		
			
			
			
			
			
			2017-11-29 23:06:11 -08:00