mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	notification-bot: @-mention the user subscribing you to a stream.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							71fb8d6195
						
					
				
				
					commit
					d83ef30904
				
			@@ -2911,7 +2911,7 @@ class GetSubscribersTest(ZulipTestCase):
 | 
				
			|||||||
        self.assert_json_success(ret)
 | 
					        self.assert_json_success(ret)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = '''
 | 
					        msg = '''
 | 
				
			||||||
            Hi there! King Hamlet just subscribed you to the following streams:
 | 
					            Hi there! @**King Hamlet** just subscribed you to the following streams:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            * #**stream_0**
 | 
					            * #**stream_0**
 | 
				
			||||||
            * #**stream_1**
 | 
					            * #**stream_1**
 | 
				
			||||||
@@ -2945,7 +2945,7 @@ class GetSubscribersTest(ZulipTestCase):
 | 
				
			|||||||
        self.assert_json_success(ret)
 | 
					        self.assert_json_success(ret)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        msg = '''
 | 
					        msg = '''
 | 
				
			||||||
            Hi there! King Hamlet just subscribed you to the stream #**stream_invite_only_1**.
 | 
					            Hi there! @**King Hamlet** just subscribed you to the stream #**stream_invite_only_1**.
 | 
				
			||||||
            '''
 | 
					            '''
 | 
				
			||||||
        self.assert_user_got_subscription_notification(msg)
 | 
					        self.assert_user_got_subscription_notification(msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -259,10 +259,10 @@ def you_were_just_subscribed_message(acting_user: UserProfile,
 | 
				
			|||||||
                                     stream_names: Set[str]) -> str:
 | 
					                                     stream_names: Set[str]) -> str:
 | 
				
			||||||
    subscriptions = sorted(list(stream_names))
 | 
					    subscriptions = sorted(list(stream_names))
 | 
				
			||||||
    if len(subscriptions) == 1:
 | 
					    if len(subscriptions) == 1:
 | 
				
			||||||
        return _("Hi there! %s just subscribed you to the stream #**%s**." %
 | 
					        return _("Hi there! @**%s** just subscribed you to the stream #**%s**." %
 | 
				
			||||||
                 (acting_user.full_name, subscriptions[0]))
 | 
					                 (acting_user.full_name, subscriptions[0]))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    message = _("Hi there! %s just subscribed you to the following streams:" %
 | 
					    message = _("Hi there! @**%s** just subscribed you to the following streams:" %
 | 
				
			||||||
                (acting_user.full_name,))
 | 
					                (acting_user.full_name,))
 | 
				
			||||||
    message += "\n\n"
 | 
					    message += "\n\n"
 | 
				
			||||||
    for stream_name in subscriptions:
 | 
					    for stream_name in subscriptions:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user