This commit is contained in:
Isaac
2025-06-18 17:24:21 +02:00
parent 8d40ccce0f
commit 1b2cdb9a9b
357 changed files with 1103 additions and 856 deletions

View File

@@ -1,11 +1,11 @@
#import "TGMessageEntitiesAttachment.h"
#import <LegacyComponents/TGMessageEntitiesAttachment.h>
#import "LegacyComponentsInternal.h"
#import "PSKeyValueEncoder.h"
#import "PSKeyValueDecoder.h"
#import <LegacyComponents/PSKeyValueEncoder.h>
#import <LegacyComponents/PSKeyValueDecoder.h>
#import "NSInputStream+TL.h"
#import <LegacyComponents/NSInputStream+TL.h>
@implementation TGMessageEntitiesAttachment
@@ -46,7 +46,7 @@
- (void)serialize:(NSMutableData *)data
{
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self];
NSData *serializedData = [NSKeyedArchiver archivedDataWithRootObject:self requiringSecureCoding:false error:nil];
int32_t length = (int32_t)serializedData.length;
[data appendBytes:&length length:4];
[data appendData:serializedData];
@@ -56,7 +56,7 @@
{
int32_t length = [is readInt32];
NSData *data = [is readData:length];
return [NSKeyedUnarchiver unarchiveObjectWithData:data];
return [NSKeyedUnarchiver unarchivedObjectOfClass:[TGMediaAttachment class] fromData:data error:nil];
}
@end