mirror of
				https://github.com/matrix-org/synapse.git
				synced 2025-10-31 16:21:56 +01:00 
			
		
		
		
	Actually write warpper function
This commit is contained in:
		
							parent
							
								
									41fd9989a2
								
							
						
					
					
						commit
						537088e7dc
					
				| @ -45,3 +45,19 @@ class SpamChecker(object): | ||||
|             return False | ||||
| 
 | ||||
|         return self.spam_checker.check_event_for_spam(event) | ||||
| 
 | ||||
|     def user_may_invite(self, userid): | ||||
|         """Checks if a given user may send an invite | ||||
| 
 | ||||
|         If this method returns false, the invite will be rejected. | ||||
| 
 | ||||
|         Args: | ||||
|             userid (string): The sender's user ID | ||||
| 
 | ||||
|         Returns: | ||||
|             bool: True if the user may send an invite, otherwise False | ||||
|         """ | ||||
|         if self.spam_checker is None: | ||||
|             return True | ||||
| 
 | ||||
|         return self.spam_checker.user_may_invite(userid) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user