mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Add support for one time use email address
The one time use address are a unique token which maps to stored stated in redis. We store the user_id, recipient_id, and subject. When an email is received at this address it is sent to the stored recipient by the stored user. Anyone with this address can send a single message as this user. (imported from commit 4219417bdc30c033a6cf7a0c7c0939f7d0308144)
This commit is contained in:
		
				
					committed by
					
						
						Waseem Daher
					
				
			
			
				
	
			
			
			
						parent
						
							52944622f8
						
					
				
				
					commit
					2a5ec20295
				
			@@ -318,7 +318,8 @@ class MirrorWorker(QueueProcessingWorker):
 | 
			
		||||
    # who gets a digest is entirely determined by the enqueue_digest_emails
 | 
			
		||||
    # management command, not here.
 | 
			
		||||
    def consume(self, event):
 | 
			
		||||
        mirror_email(email.message_from_string(event["message"].encode("utf-8")), rcpt_to=event["rcpt_to"])
 | 
			
		||||
        mirror_email(email.message_from_string(event["message"].encode("utf-8")),
 | 
			
		||||
                     rcpt_to=event["rcpt_to"], pre_checked=True)
 | 
			
		||||
 | 
			
		||||
@assign_queue('test')
 | 
			
		||||
class TestWorker(QueueProcessingWorker):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user