If we got sha from disk and don't ask for new avatar, store sha in mem
This commit is contained in:
		
							parent
							
								
									3f16220afb
								
							
						
					
					
						commit
						e4fca50eb7
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -1683,7 +1683,11 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
 | 
				
			||||||
							cached_sha = ''
 | 
												cached_sha = ''
 | 
				
			||||||
						if cached_sha != avatar_sha:
 | 
											if cached_sha != avatar_sha:
 | 
				
			||||||
							# avatar has been updated
 | 
												# avatar has been updated
 | 
				
			||||||
 | 
												# sha in mem will be updated later
 | 
				
			||||||
							self.request_vcard(who, True)
 | 
												self.request_vcard(who, True)
 | 
				
			||||||
 | 
											else:
 | 
				
			||||||
 | 
												# save sha in mem NOW
 | 
				
			||||||
 | 
												self.vcard_shas[who] = avatar_sha
 | 
				
			||||||
				self.dispatch('GC_NOTIFY', (jid_stripped, show, status, resource,
 | 
									self.dispatch('GC_NOTIFY', (jid_stripped, show, status, resource,
 | 
				
			||||||
					prs.getRole(), prs.getAffiliation(), prs.getJid(),
 | 
										prs.getRole(), prs.getAffiliation(), prs.getJid(),
 | 
				
			||||||
					prs.getReason(), prs.getActor(), prs.getStatusCode(),
 | 
										prs.getReason(), prs.getActor(), prs.getStatusCode(),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue