From 612df0a02634b00bd6e820dd5915a0bf4cd12b86 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 2 May 2018 10:51:47 -0400 Subject: [PATCH] Send fake contacts. --- Signal/src/ViewControllers/DebugUI/DebugUIMessages.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m index c4b13a2e0..68d1a218b 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m @@ -124,6 +124,10 @@ NS_ASSUME_NONNULL_BEGIN actionBlock:^{ [DebugUIMessages selectBackDatedAction:thread]; }], + [OWSTableItem itemWithTitle:@"Send All Contacts" + actionBlock:^{ + [DebugUIMessages sendAllContacts:thread]; + }], #pragma mark - Misc. @@ -306,6 +310,14 @@ NS_ASSUME_NONNULL_BEGIN [self performActionNTimes:[self sendTextMessagesActionInThread:thread]]; } ++ (void)sendAllContacts:(TSThread *)thread +{ + NSArray *subactions = [self allShareContactActions:thread includeLabels:NO]; + DebugUIMessagesAction *action = + [DebugUIMessagesGroupAction allGroupActionWithLabel:@"All Fake Share Contact" subactions:subactions]; + [action prepareAndPerformNTimes:subactions.count]; +} + + (DebugUIMessagesAction *)sendTextMessagesActionInThread:(TSThread *)thread { OWSAssert(thread);