Send fake contacts.

This commit is contained in:
Matthew Chen 2018-05-02 10:51:47 -04:00
parent d4bec2d068
commit 612df0a026

View file

@ -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<DebugUIMessagesAction *> *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);