|
|
|
@ -991,6 +991,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[self sendFakeMessages:counter thread:thread transaction:transaction];
|
|
|
|
|
}];
|
|
|
|
|
remainder -= batchSize;
|
|
|
|
|
DDLogInfo(@"%@ sendFakeMessages %zd / %zd", self.logTag, counter - remainder, counter);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1010,7 +1011,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
authorId:@"+19174054215"
|
|
|
|
|
sourceDeviceId:0
|
|
|
|
|
messageBody:randomText];
|
|
|
|
|
DDLogError(@"%@ sendFakeMessages incoming timestamp: %llu.", self.logTag, message.timestamp);
|
|
|
|
|
// DDLogError(@"%@ sendFakeMessages incoming timestamp: %llu.", self.logTag,
|
|
|
|
|
// message.timestamp);
|
|
|
|
|
[message markAsReadWithTransaction:transaction sendReadReceipt:NO updateExpiration:NO];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -1019,8 +1021,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp]
|
|
|
|
|
inThread:thread
|
|
|
|
|
messageBody:randomText];
|
|
|
|
|
DDLogError(@"%@ sendFakeMessages outgoing timestamp: %llu.", self.logTag, message.timestamp);
|
|
|
|
|
// DDLogError(@"%@ sendFakeMessages outgoing timestamp: %llu.", self.logTag,
|
|
|
|
|
// message.timestamp);
|
|
|
|
|
[message saveWithTransaction:transaction];
|
|
|
|
|
[message updateWithMessageState:TSOutgoingMessageStateUnsent transaction:transaction];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 2: {
|
|
|
|
@ -1045,7 +1049,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
pointer.uniqueId,
|
|
|
|
|
]
|
|
|
|
|
expiresInSeconds:0];
|
|
|
|
|
DDLogError(@"%@ sendFakeMessages incoming attachment timestamp: %llu.", self.logTag, message.timestamp);
|
|
|
|
|
// DDLogError(@"%@ sendFakeMessages incoming attachment timestamp: %llu.", self.logTag,
|
|
|
|
|
// message.timestamp);
|
|
|
|
|
[message markAsReadWithTransaction:transaction sendReadReceipt:NO updateExpiration:NO];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -1056,7 +1061,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
messageBody:nil
|
|
|
|
|
isVoiceMessage:NO
|
|
|
|
|
expiresInSeconds:0];
|
|
|
|
|
DDLogError(@"%@ sendFakeMessages outgoing attachment timestamp: %llu.", self.logTag, message.timestamp);
|
|
|
|
|
// DDLogError(@"%@ sendFakeMessages outgoing attachment timestamp: %llu.", self.logTag,
|
|
|
|
|
// message.timestamp);
|
|
|
|
|
|
|
|
|
|
NSString *filename = @"test.mp3";
|
|
|
|
|
UInt32 filesize = 16;
|
|
|
|
@ -1075,6 +1081,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
message.attachmentFilenameMap[attachmentStream.uniqueId] = filename;
|
|
|
|
|
}
|
|
|
|
|
[message saveWithTransaction:transaction];
|
|
|
|
|
[message updateWithMessageState:TSOutgoingMessageStateUnsent transaction:transaction];
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|