mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-30 19:43:47 +00:00 
			
		
		
		
	notification_triggers: Reduce loose string usage.
This commit uses 'NotificationTriggers' class attributes
instead of directly using loose strings.
This should have been ideally included in the commit
c3319a5231.
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							e2847790b6
						
					
				
				
					commit
					e12cd9862a
				
			| @@ -36,6 +36,7 @@ from zerver.lib.url_encoding import ( | ||||
| ) | ||||
| from zerver.models import ( | ||||
|     Message, | ||||
|     NotificationTriggers, | ||||
|     Realm, | ||||
|     Recipient, | ||||
|     Stream, | ||||
| @@ -524,7 +525,8 @@ def do_send_missedmessage_events_reply_in_zulip( | ||||
|                 { | ||||
|                     m["message"].sender | ||||
|                     for m in missed_messages | ||||
|                     if m["trigger"] == "mentioned" or m["trigger"] == "wildcard_mentioned" | ||||
|                     if m["trigger"] == NotificationTriggers.MENTION | ||||
|                     or m["trigger"] == NotificationTriggers.WILDCARD_MENTION | ||||
|                 } | ||||
|             ) | ||||
|         message = missed_messages[0]["message"] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user