|
|
|
@ -51,6 +51,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
return @"Messages";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
|
- (NSArray<OWSTableItem *> *)itemsForActions:(NSArray<DebugUIMessagesAction *> *)actions
|
|
|
|
|
{
|
|
|
|
|
NSMutableArray<OWSTableItem *> *items = [NSMutableArray new];
|
|
|
|
@ -75,12 +77,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
return items;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
- (nullable OWSTableSection *)sectionForThread:(nullable TSThread *)thread
|
|
|
|
|
{
|
|
|
|
|
OWSAssert(thread);
|
|
|
|
|
|
|
|
|
|
NSMutableArray<OWSTableItem *> *items = [NSMutableArray new];
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
|
[items addObject:[OWSTableItem itemWithTitle:@"Delete all messages in thread"
|
|
|
|
|
actionBlock:^{
|
|
|
|
|
[DebugUIMessages deleteAllMessagesInThread:thread];
|
|
|
|
@ -297,9 +303,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[DebugUIMessages sendMessages:1 toAllMembersOfGroup:groupThread];
|
|
|
|
|
}]];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return [OWSTableSection sectionWithTitle:self.name items:items];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
|
+ (void)sendMessages:(NSUInteger)count toAllMembersOfGroup:(TSGroupThread *)groupThread
|
|
|
|
|
{
|
|
|
|
|
for (NSString *recipientId in groupThread.groupModel.groupMemberIds) {
|
|
|
|
@ -4655,6 +4666,8 @@ typedef OWSContact * (^OWSContactBlock)(YapDatabaseReadWriteTransaction *transac
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
|