mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
no message
This commit is contained in:
parent
e40b2fc77a
commit
69785d10e6
@ -7,32 +7,6 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
D03B0C951D6222CA00955575 /* NBAsYouTypeFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C7B1D6222CA00955575 /* NBAsYouTypeFormatter.h */; };
|
|
||||||
D03B0C961D6222CA00955575 /* NBAsYouTypeFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C7C1D6222CA00955575 /* NBAsYouTypeFormatter.m */; };
|
|
||||||
D03B0C971D6222CA00955575 /* NBMetadataCore.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C7D1D6222CA00955575 /* NBMetadataCore.h */; };
|
|
||||||
D03B0C981D6222CA00955575 /* NBMetadataCore.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C7E1D6222CA00955575 /* NBMetadataCore.m */; };
|
|
||||||
D03B0C991D6222CA00955575 /* NBMetadataCoreMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C7F1D6222CA00955575 /* NBMetadataCoreMapper.h */; };
|
|
||||||
D03B0C9A1D6222CA00955575 /* NBMetadataCoreMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C801D6222CA00955575 /* NBMetadataCoreMapper.m */; };
|
|
||||||
D03B0C9B1D6222CA00955575 /* NBMetadataCoreTest.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C811D6222CA00955575 /* NBMetadataCoreTest.h */; };
|
|
||||||
D03B0C9C1D6222CA00955575 /* NBMetadataCoreTest.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C821D6222CA00955575 /* NBMetadataCoreTest.m */; };
|
|
||||||
D03B0C9D1D6222CA00955575 /* NBMetadataCoreTestMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C831D6222CA00955575 /* NBMetadataCoreTestMapper.h */; };
|
|
||||||
D03B0C9E1D6222CA00955575 /* NBMetadataCoreTestMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C841D6222CA00955575 /* NBMetadataCoreTestMapper.m */; };
|
|
||||||
D03B0C9F1D6222CA00955575 /* NBMetadataHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C851D6222CA00955575 /* NBMetadataHelper.h */; };
|
|
||||||
D03B0CA01D6222CA00955575 /* NBMetadataHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C861D6222CA00955575 /* NBMetadataHelper.m */; };
|
|
||||||
D03B0CA11D6222CA00955575 /* NBNumberFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C871D6222CA00955575 /* NBNumberFormat.h */; };
|
|
||||||
D03B0CA21D6222CA00955575 /* NBNumberFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C881D6222CA00955575 /* NBNumberFormat.m */; };
|
|
||||||
D03B0CA31D6222CA00955575 /* NBPhoneMetaData.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C891D6222CA00955575 /* NBPhoneMetaData.h */; };
|
|
||||||
D03B0CA41D6222CA00955575 /* NBPhoneMetaData.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C8A1D6222CA00955575 /* NBPhoneMetaData.m */; };
|
|
||||||
D03B0CA51D6222CA00955575 /* NBPhoneMetaDataGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C8B1D6222CA00955575 /* NBPhoneMetaDataGenerator.h */; };
|
|
||||||
D03B0CA61D6222CA00955575 /* NBPhoneMetaDataGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C8C1D6222CA00955575 /* NBPhoneMetaDataGenerator.m */; };
|
|
||||||
D03B0CA71D6222CA00955575 /* NBPhoneNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C8D1D6222CA00955575 /* NBPhoneNumber.h */; };
|
|
||||||
D03B0CA81D6222CA00955575 /* NBPhoneNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C8E1D6222CA00955575 /* NBPhoneNumber.m */; };
|
|
||||||
D03B0CA91D6222CA00955575 /* NBPhoneNumberDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C8F1D6222CA00955575 /* NBPhoneNumberDefines.h */; };
|
|
||||||
D03B0CAA1D6222CA00955575 /* NBPhoneNumberDefines.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C901D6222CA00955575 /* NBPhoneNumberDefines.m */; };
|
|
||||||
D03B0CAB1D6222CA00955575 /* NBPhoneNumberDesc.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C911D6222CA00955575 /* NBPhoneNumberDesc.h */; };
|
|
||||||
D03B0CAC1D6222CA00955575 /* NBPhoneNumberDesc.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C921D6222CA00955575 /* NBPhoneNumberDesc.m */; };
|
|
||||||
D03B0CAD1D6222CA00955575 /* NBPhoneNumberUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0C931D6222CA00955575 /* NBPhoneNumberUtil.h */; };
|
|
||||||
D03B0CAE1D6222CA00955575 /* NBPhoneNumberUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0C941D6222CA00955575 /* NBPhoneNumberUtil.m */; };
|
|
||||||
D03B0CB91D62233400955575 /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CB81D62233400955575 /* Either.swift */; };
|
D03B0CB91D62233400955575 /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CB81D62233400955575 /* Either.swift */; };
|
||||||
D03B0CBB1D62233C00955575 /* MergeLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBA1D62233C00955575 /* MergeLists.swift */; };
|
D03B0CBB1D62233C00955575 /* MergeLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBA1D62233C00955575 /* MergeLists.swift */; };
|
||||||
D03B0CBD1D62234300955575 /* Regex.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBC1D62234300955575 /* Regex.swift */; };
|
D03B0CBD1D62234300955575 /* Regex.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBC1D62234300955575 /* Regex.swift */; };
|
||||||
@ -55,7 +29,6 @@
|
|||||||
D03B0CF71D62250800955575 /* TelegramMediaImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */; };
|
D03B0CF71D62250800955575 /* TelegramMediaImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */; };
|
||||||
D03B0CF81D62250800955575 /* TelegramMediaLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */; };
|
D03B0CF81D62250800955575 /* TelegramMediaLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */; };
|
||||||
D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF11D62250800955575 /* TelegramMediaMap.swift */; };
|
D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF11D62250800955575 /* TelegramMediaMap.swift */; };
|
||||||
D03B0CFA1D62250800955575 /* TelegramMediaVoiceNote.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF21D62250800955575 /* TelegramMediaVoiceNote.swift */; };
|
|
||||||
D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */; };
|
D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */; };
|
||||||
D03B0CFD1D62251400955575 /* TelegramMediaCloudLocations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFC1D62251400955575 /* TelegramMediaCloudLocations.swift */; };
|
D03B0CFD1D62251400955575 /* TelegramMediaCloudLocations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFC1D62251400955575 /* TelegramMediaCloudLocations.swift */; };
|
||||||
D03B0D081D62255C00955575 /* ChannelState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFF1D62255C00955575 /* ChannelState.swift */; };
|
D03B0D081D62255C00955575 /* ChannelState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFF1D62255C00955575 /* ChannelState.swift */; };
|
||||||
@ -85,14 +58,11 @@
|
|||||||
D03B0D721D631ABA00955575 /* SearchMessages.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D711D631ABA00955575 /* SearchMessages.swift */; };
|
D03B0D721D631ABA00955575 /* SearchMessages.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D711D631ABA00955575 /* SearchMessages.swift */; };
|
||||||
D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E411D631E6600955575 /* NetworkLogging.h */; };
|
D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E411D631E6600955575 /* NetworkLogging.h */; };
|
||||||
D03B0E441D631E6600955575 /* NetworkLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E421D631E6600955575 /* NetworkLogging.m */; };
|
D03B0E441D631E6600955575 /* NetworkLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E421D631E6600955575 /* NetworkLogging.m */; };
|
||||||
D03B0E581D631EB900955575 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E571D631EB900955575 /* CoreMedia.framework */; };
|
|
||||||
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */; };
|
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */; };
|
||||||
D03B0E5E1D6327F600955575 /* SSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5D1D6327F600955575 /* SSignalKit.framework */; };
|
|
||||||
D06706691D512ADB00DED3E3 /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706641D512ADB00DED3E3 /* AsyncDisplayKit.framework */; };
|
|
||||||
D067066A1D512ADB00DED3E3 /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706651D512ADB00DED3E3 /* Display.framework */; };
|
|
||||||
D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706671D512ADB00DED3E3 /* Postbox.framework */; };
|
D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706671D512ADB00DED3E3 /* Postbox.framework */; };
|
||||||
D067066D1D512ADB00DED3E3 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */; };
|
D067066D1D512ADB00DED3E3 /* SwiftSignalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */; };
|
||||||
D067066F1D512AEB00DED3E3 /* MtProtoKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */; };
|
D09A2FE61D7CD4940018FB72 /* TelegramChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09A2FE51D7CD4940018FB72 /* TelegramChannel.swift */; };
|
||||||
|
D09A2FEB1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09A2FEA1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift */; };
|
||||||
D09D8C0B1D4FAB1D0081DBEC /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */; };
|
D09D8C0B1D4FAB1D0081DBEC /* TelegramCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */; };
|
||||||
D09D8C101D4FAB1D0081DBEC /* TelegramCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */; };
|
D09D8C101D4FAB1D0081DBEC /* TelegramCoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D09D8C0F1D4FAB1D0081DBEC /* TelegramCoreTests.m */; };
|
||||||
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */ = {isa = PBXBuildFile; fileRef = D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */ = {isa = PBXBuildFile; fileRef = D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
@ -101,7 +71,72 @@
|
|||||||
D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */; };
|
D0AB0B961D662F0B002C78E7 /* ManagedChatListHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */; };
|
||||||
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */; };
|
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */; };
|
||||||
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */; };
|
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */; };
|
||||||
D0F69EA41D6B8ED60046BCD6 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D03B0E5F1D6327FF00955575 /* libz.tbd */; };
|
D0B417C11D7DCEEF004562A4 /* ApiGroupOrChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B417C01D7DCEEF004562A4 /* ApiGroupOrChannel.swift */; };
|
||||||
|
D0B4186B1D7E03D5004562A4 /* TelegramCoreMac.h in Headers */ = {isa = PBXBuildFile; fileRef = D0B418691D7E03D5004562A4 /* TelegramCoreMac.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
D0B418721D7E0409004562A4 /* PostboxMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B418701D7E0409004562A4 /* PostboxMac.framework */; };
|
||||||
|
D0B418731D7E0409004562A4 /* SwiftSignalKitMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B418711D7E0409004562A4 /* SwiftSignalKitMac.framework */; };
|
||||||
|
D0B4187F1D7E054E004562A4 /* MtProtoKitMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B4187E1D7E054E004562A4 /* MtProtoKitMac.framework */; };
|
||||||
|
D0B418801D7E0567004562A4 /* Either.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CB81D62233400955575 /* Either.swift */; };
|
||||||
|
D0B418811D7E0567004562A4 /* MergeLists.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBA1D62233C00955575 /* MergeLists.swift */; };
|
||||||
|
D0B418821D7E0567004562A4 /* Regex.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBC1D62234300955575 /* Regex.swift */; };
|
||||||
|
D0B418831D7E0567004562A4 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CBE1D62234A00955575 /* Log.swift */; };
|
||||||
|
D0B418841D7E0567004562A4 /* StringFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CC01D62235000955575 /* StringFormat.swift */; };
|
||||||
|
D0B418851D7E0567004562A4 /* PhoneNumbers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CCD1D62239600955575 /* PhoneNumbers.swift */; };
|
||||||
|
D0B418861D7E056D004562A4 /* Namespaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CD21D62244300955575 /* Namespaces.swift */; };
|
||||||
|
D0B418871D7E0573004562A4 /* ApiUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CDA1D62245F00955575 /* ApiUtils.swift */; };
|
||||||
|
D0B418881D7E0573004562A4 /* PeerUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CD81D62245B00955575 /* PeerUtils.swift */; };
|
||||||
|
D0B418891D7E0573004562A4 /* PeerAccessRestrictionInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09A2FEA1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift */; };
|
||||||
|
D0B4188A1D7E0573004562A4 /* TelegramUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CD41D62245300955575 /* TelegramUser.swift */; };
|
||||||
|
D0B4188B1D7E0573004562A4 /* TelegramGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CD51D62245300955575 /* TelegramGroup.swift */; };
|
||||||
|
D0B4188C1D7E0573004562A4 /* TelegramChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D09A2FE51D7CD4940018FB72 /* TelegramChannel.swift */; };
|
||||||
|
D0B4188D1D7E0573004562A4 /* ApiGroupOrChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B417C01D7DCEEF004562A4 /* ApiGroupOrChannel.swift */; };
|
||||||
|
D0B4188E1D7E0578004562A4 /* StoreMessage_Telegram.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CDF1D62249100955575 /* StoreMessage_Telegram.swift */; };
|
||||||
|
D0B4188F1D7E057C004562A4 /* ViewCountMessageAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CE71D6224AD00955575 /* ViewCountMessageAttribute.swift */; };
|
||||||
|
D0B418901D7E057C004562A4 /* ReplyMessageAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CE51D6224A700955575 /* ReplyMessageAttribute.swift */; };
|
||||||
|
D0B418911D7E057C004562A4 /* TextEntitiesMessageAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CE31D62249F00955575 /* TextEntitiesMessageAttribute.swift */; };
|
||||||
|
D0B418921D7E057C004562A4 /* InlineBotMessageAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CE11D62249B00955575 /* InlineBotMessageAttribute.swift */; };
|
||||||
|
D0B418931D7E0580004562A4 /* TelegramMediaCloudLocations.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFC1D62251400955575 /* TelegramMediaCloudLocations.swift */; };
|
||||||
|
D0B418941D7E0580004562A4 /* TelegramMediaAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CEC1D62250800955575 /* TelegramMediaAction.swift */; };
|
||||||
|
D0B418951D7E0580004562A4 /* TelegramMediaContact.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CED1D62250800955575 /* TelegramMediaContact.swift */; };
|
||||||
|
D0B418961D7E0580004562A4 /* TelegramMediaFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CEE1D62250800955575 /* TelegramMediaFile.swift */; };
|
||||||
|
D0B418971D7E0580004562A4 /* TelegramMediaImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */; };
|
||||||
|
D0B418981D7E0580004562A4 /* TelegramMediaLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */; };
|
||||||
|
D0B418991D7E0580004562A4 /* TelegramMediaMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF11D62250800955575 /* TelegramMediaMap.swift */; };
|
||||||
|
D0B4189B1D7E0580004562A4 /* TelegramMediaWebpage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */; };
|
||||||
|
D0B4189C1D7E0587004562A4 /* ChannelState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0CFF1D62255C00955575 /* ChannelState.swift */; };
|
||||||
|
D0B4189D1D7E0587004562A4 /* EnqueueMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D001D62255C00955575 /* EnqueueMessage.swift */; };
|
||||||
|
D0B4189E1D7E0587004562A4 /* Holes.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D011D62255C00955575 /* Holes.swift */; };
|
||||||
|
D0B4189F1D7E0587004562A4 /* SendUnsentMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D021D62255C00955575 /* SendUnsentMessage.swift */; };
|
||||||
|
D0B418A01D7E0587004562A4 /* StateManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D031D62255C00955575 /* StateManagement.swift */; };
|
||||||
|
D0B418A11D7E0587004562A4 /* SynchronizePeerReadState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D041D62255C00955575 /* SynchronizePeerReadState.swift */; };
|
||||||
|
D0B418A21D7E0587004562A4 /* UpdateGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D051D62255C00955575 /* UpdateGroup.swift */; };
|
||||||
|
D0B418A31D7E0587004562A4 /* UpdateMessageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D061D62255C00955575 /* UpdateMessageService.swift */; };
|
||||||
|
D0B418A41D7E0587004562A4 /* UpdatesApiUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D071D62255C00955575 /* UpdatesApiUtils.swift */; };
|
||||||
|
D0B418A51D7E058E004562A4 /* DownloadFromCloudLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D491D631A3800955575 /* DownloadFromCloudLocation.swift */; };
|
||||||
|
D0B418A61D7E0592004562A4 /* CloudFileMediaResource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D431D6319F900955575 /* CloudFileMediaResource.swift */; };
|
||||||
|
D0B418A71D7E0592004562A4 /* Fetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D391D6319E200955575 /* Fetch.swift */; };
|
||||||
|
D0B418A81D7E0597004562A4 /* Api.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D541D631A6900955575 /* Api.swift */; };
|
||||||
|
D0B418A91D7E0597004562A4 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D551D631A6900955575 /* Buffer.swift */; };
|
||||||
|
D0B418AA1D7E0597004562A4 /* Download.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D561D631A6900955575 /* Download.swift */; };
|
||||||
|
D0B418AB1D7E0597004562A4 /* MultipartFetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D571D631A6900955575 /* MultipartFetch.swift */; };
|
||||||
|
D0B418AC1D7E0597004562A4 /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D581D631A6900955575 /* Network.swift */; };
|
||||||
|
D0B418AD1D7E0597004562A4 /* Serialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D591D631A6900955575 /* Serialization.swift */; };
|
||||||
|
D0B418AE1D7E059F004562A4 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D611D631A8B00955575 /* Account.swift */; };
|
||||||
|
D0B418AF1D7E059F004562A4 /* AccountSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D621D631A8B00955575 /* AccountSettings.swift */; };
|
||||||
|
D0B418B01D7E059F004562A4 /* AccountViewTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D631D631A8B00955575 /* AccountViewTracker.swift */; };
|
||||||
|
D0B418B11D7E059F004562A4 /* RecentPeers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D641D631A8B00955575 /* RecentPeers.swift */; };
|
||||||
|
D0B418B21D7E059F004562A4 /* ManagedServiceViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B911D65E9FA002C78E7 /* ManagedServiceViews.swift */; };
|
||||||
|
D0B418B31D7E059F004562A4 /* ManagedMessageHistoryHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B931D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift */; };
|
||||||
|
D0B418B41D7E059F004562A4 /* ManagedChatListHoles.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */; };
|
||||||
|
D0B418B51D7E059F004562A4 /* ManagedUnsentMessageIndices.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */; };
|
||||||
|
D0B418B61D7E059F004562A4 /* ManagedSynchronizePeerReadStates.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */; };
|
||||||
|
D0B418B71D7E05A6004562A4 /* Phonebook.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D6A1D631A9D00955575 /* Phonebook.swift */; };
|
||||||
|
D0B418B81D7E05A6004562A4 /* ContactManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D6C1D631AA300955575 /* ContactManagement.swift */; };
|
||||||
|
D0B418B91D7E05AD004562A4 /* SearchMessages.swift in Sources */ = {isa = PBXBuildFile; fileRef = D03B0D711D631ABA00955575 /* SearchMessages.swift */; };
|
||||||
|
D0B418BA1D7E05BB004562A4 /* NetworkLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = D03B0E421D631E6600955575 /* NetworkLogging.m */; };
|
||||||
|
D0B418BB1D7E05BE004562A4 /* NetworkLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E411D631E6600955575 /* NetworkLogging.h */; };
|
||||||
|
D0B418BC1D7E05D0004562A4 /* TelegramCoreIncludes.h in Headers */ = {isa = PBXBuildFile; fileRef = D03B0E5B1D63240700955575 /* TelegramCoreIncludes.h */; };
|
||||||
|
D0CAF2EA1D75EC600011F558 /* MtProtoKitDynamic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0CAF2E91D75EC600011F558 /* MtProtoKitDynamic.framework */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -115,32 +150,6 @@
|
|||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
D03B0C7B1D6222CA00955575 /* NBAsYouTypeFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBAsYouTypeFormatter.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C7C1D6222CA00955575 /* NBAsYouTypeFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBAsYouTypeFormatter.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C7D1D6222CA00955575 /* NBMetadataCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBMetadataCore.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C7E1D6222CA00955575 /* NBMetadataCore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBMetadataCore.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C7F1D6222CA00955575 /* NBMetadataCoreMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBMetadataCoreMapper.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C801D6222CA00955575 /* NBMetadataCoreMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBMetadataCoreMapper.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C811D6222CA00955575 /* NBMetadataCoreTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBMetadataCoreTest.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C821D6222CA00955575 /* NBMetadataCoreTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBMetadataCoreTest.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C831D6222CA00955575 /* NBMetadataCoreTestMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBMetadataCoreTestMapper.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C841D6222CA00955575 /* NBMetadataCoreTestMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBMetadataCoreTestMapper.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C851D6222CA00955575 /* NBMetadataHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBMetadataHelper.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C861D6222CA00955575 /* NBMetadataHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBMetadataHelper.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C871D6222CA00955575 /* NBNumberFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBNumberFormat.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C881D6222CA00955575 /* NBNumberFormat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBNumberFormat.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C891D6222CA00955575 /* NBPhoneMetaData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneMetaData.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C8A1D6222CA00955575 /* NBPhoneMetaData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneMetaData.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C8B1D6222CA00955575 /* NBPhoneMetaDataGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneMetaDataGenerator.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C8C1D6222CA00955575 /* NBPhoneMetaDataGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneMetaDataGenerator.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C8D1D6222CA00955575 /* NBPhoneNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneNumber.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C8E1D6222CA00955575 /* NBPhoneNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneNumber.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C8F1D6222CA00955575 /* NBPhoneNumberDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneNumberDefines.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C901D6222CA00955575 /* NBPhoneNumberDefines.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneNumberDefines.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C911D6222CA00955575 /* NBPhoneNumberDesc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneNumberDesc.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C921D6222CA00955575 /* NBPhoneNumberDesc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneNumberDesc.m; sourceTree = "<group>"; };
|
|
||||||
D03B0C931D6222CA00955575 /* NBPhoneNumberUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NBPhoneNumberUtil.h; sourceTree = "<group>"; };
|
|
||||||
D03B0C941D6222CA00955575 /* NBPhoneNumberUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NBPhoneNumberUtil.m; sourceTree = "<group>"; };
|
|
||||||
D03B0CB81D62233400955575 /* Either.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Either.swift; sourceTree = "<group>"; };
|
D03B0CB81D62233400955575 /* Either.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Either.swift; sourceTree = "<group>"; };
|
||||||
D03B0CBA1D62233C00955575 /* MergeLists.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MergeLists.swift; sourceTree = "<group>"; };
|
D03B0CBA1D62233C00955575 /* MergeLists.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MergeLists.swift; sourceTree = "<group>"; };
|
||||||
D03B0CBC1D62234300955575 /* Regex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Regex.swift; sourceTree = "<group>"; };
|
D03B0CBC1D62234300955575 /* Regex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Regex.swift; sourceTree = "<group>"; };
|
||||||
@ -163,7 +172,6 @@
|
|||||||
D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaImage.swift; sourceTree = "<group>"; };
|
D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaImage.swift; sourceTree = "<group>"; };
|
||||||
D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaLocation.swift; sourceTree = "<group>"; };
|
D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaLocation.swift; sourceTree = "<group>"; };
|
||||||
D03B0CF11D62250800955575 /* TelegramMediaMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaMap.swift; sourceTree = "<group>"; };
|
D03B0CF11D62250800955575 /* TelegramMediaMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaMap.swift; sourceTree = "<group>"; };
|
||||||
D03B0CF21D62250800955575 /* TelegramMediaVoiceNote.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaVoiceNote.swift; sourceTree = "<group>"; };
|
|
||||||
D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaWebpage.swift; sourceTree = "<group>"; };
|
D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaWebpage.swift; sourceTree = "<group>"; };
|
||||||
D03B0CFC1D62251400955575 /* TelegramMediaCloudLocations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaCloudLocations.swift; sourceTree = "<group>"; };
|
D03B0CFC1D62251400955575 /* TelegramMediaCloudLocations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramMediaCloudLocations.swift; sourceTree = "<group>"; };
|
||||||
D03B0CFF1D62255C00955575 /* ChannelState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelState.swift; sourceTree = "<group>"; };
|
D03B0CFF1D62255C00955575 /* ChannelState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelState.swift; sourceTree = "<group>"; };
|
||||||
@ -209,6 +217,8 @@
|
|||||||
D06706671D512ADB00DED3E3 /* Postbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Postbox.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Postbox.framework"; sourceTree = "<group>"; };
|
D06706671D512ADB00DED3E3 /* Postbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Postbox.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/Postbox.framework"; sourceTree = "<group>"; };
|
||||||
D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftSignalKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/SwiftSignalKit.framework"; sourceTree = "<group>"; };
|
D06706681D512ADB00DED3E3 /* SwiftSignalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftSignalKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/SwiftSignalKit.framework"; sourceTree = "<group>"; };
|
||||||
D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/MtProtoKit.framework"; sourceTree = "<group>"; };
|
D067066E1D512AEB00DED3E3 /* MtProtoKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/MtProtoKit.framework"; sourceTree = "<group>"; };
|
||||||
|
D09A2FE51D7CD4940018FB72 /* TelegramChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TelegramChannel.swift; sourceTree = "<group>"; };
|
||||||
|
D09A2FEA1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerAccessRestrictionInfo.swift; sourceTree = "<group>"; };
|
||||||
D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TelegramCore.h; sourceTree = "<group>"; };
|
D09D8C041D4FAB1D0081DBEC /* TelegramCore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TelegramCore.h; sourceTree = "<group>"; };
|
||||||
D09D8C051D4FAB1D0081DBEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
D09D8C051D4FAB1D0081DBEC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
@ -220,6 +230,15 @@
|
|||||||
D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedChatListHoles.swift; sourceTree = "<group>"; };
|
D0AB0B951D662F0B002C78E7 /* ManagedChatListHoles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedChatListHoles.swift; sourceTree = "<group>"; };
|
||||||
D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedUnsentMessageIndices.swift; sourceTree = "<group>"; };
|
D0AB0B971D664E18002C78E7 /* ManagedUnsentMessageIndices.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedUnsentMessageIndices.swift; sourceTree = "<group>"; };
|
||||||
D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedSynchronizePeerReadStates.swift; sourceTree = "<group>"; };
|
D0AB0B991D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ManagedSynchronizePeerReadStates.swift; sourceTree = "<group>"; };
|
||||||
|
D0AC49491D7097A400AA55DA /* SSignalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SSignalKit.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphoneos/SSignalKit.framework"; sourceTree = "<group>"; };
|
||||||
|
D0B417C01D7DCEEF004562A4 /* ApiGroupOrChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiGroupOrChannel.swift; sourceTree = "<group>"; };
|
||||||
|
D0B418671D7E03D5004562A4 /* TelegramCoreMac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramCoreMac.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
D0B418691D7E03D5004562A4 /* TelegramCoreMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TelegramCoreMac.h; sourceTree = "<group>"; };
|
||||||
|
D0B4186A1D7E03D5004562A4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
D0B418701D7E0409004562A4 /* PostboxMac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PostboxMac.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug/PostboxMac.framework"; sourceTree = "<group>"; };
|
||||||
|
D0B418711D7E0409004562A4 /* SwiftSignalKitMac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftSignalKitMac.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug/SwiftSignalKitMac.framework"; sourceTree = "<group>"; };
|
||||||
|
D0B4187E1D7E054E004562A4 /* MtProtoKitMac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKitMac.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug/MtProtoKitMac.framework"; sourceTree = "<group>"; };
|
||||||
|
D0CAF2E91D75EC600011F558 /* MtProtoKitDynamic.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MtProtoKitDynamic.framework; path = "../../../../Library/Developer/Xcode/DerivedData/Telegram-iOS-diblohvjozhgaifjcniwdlixlilx/Build/Products/Debug-iphonesimulator/MtProtoKitDynamic.framework"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -227,12 +246,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
D0F69EA41D6B8ED60046BCD6 /* libz.tbd in Frameworks */,
|
D0CAF2EA1D75EC600011F558 /* MtProtoKitDynamic.framework in Frameworks */,
|
||||||
D03B0E5E1D6327F600955575 /* SSignalKit.framework in Frameworks */,
|
|
||||||
D03B0E581D631EB900955575 /* CoreMedia.framework in Frameworks */,
|
|
||||||
D067066F1D512AEB00DED3E3 /* MtProtoKit.framework in Frameworks */,
|
|
||||||
D06706691D512ADB00DED3E3 /* AsyncDisplayKit.framework in Frameworks */,
|
|
||||||
D067066A1D512ADB00DED3E3 /* Display.framework in Frameworks */,
|
|
||||||
D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */,
|
D067066C1D512ADB00DED3E3 /* Postbox.framework in Frameworks */,
|
||||||
D067066D1D512ADB00DED3E3 /* SwiftSignalKit.framework in Frameworks */,
|
D067066D1D512ADB00DED3E3 /* SwiftSignalKit.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
@ -246,6 +260,16 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
D0B418631D7E03D5004562A4 /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
D0B4187F1D7E054E004562A4 /* MtProtoKitMac.framework in Frameworks */,
|
||||||
|
D0B418721D7E0409004562A4 /* PostboxMac.framework in Frameworks */,
|
||||||
|
D0B418731D7E0409004562A4 /* SwiftSignalKitMac.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
/* Begin PBXGroup section */
|
||||||
@ -260,32 +284,6 @@
|
|||||||
D03B0C7A1D6222CA00955575 /* libphonenumber-iOS */ = {
|
D03B0C7A1D6222CA00955575 /* libphonenumber-iOS */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
D03B0C7B1D6222CA00955575 /* NBAsYouTypeFormatter.h */,
|
|
||||||
D03B0C7C1D6222CA00955575 /* NBAsYouTypeFormatter.m */,
|
|
||||||
D03B0C7D1D6222CA00955575 /* NBMetadataCore.h */,
|
|
||||||
D03B0C7E1D6222CA00955575 /* NBMetadataCore.m */,
|
|
||||||
D03B0C7F1D6222CA00955575 /* NBMetadataCoreMapper.h */,
|
|
||||||
D03B0C801D6222CA00955575 /* NBMetadataCoreMapper.m */,
|
|
||||||
D03B0C811D6222CA00955575 /* NBMetadataCoreTest.h */,
|
|
||||||
D03B0C821D6222CA00955575 /* NBMetadataCoreTest.m */,
|
|
||||||
D03B0C831D6222CA00955575 /* NBMetadataCoreTestMapper.h */,
|
|
||||||
D03B0C841D6222CA00955575 /* NBMetadataCoreTestMapper.m */,
|
|
||||||
D03B0C851D6222CA00955575 /* NBMetadataHelper.h */,
|
|
||||||
D03B0C861D6222CA00955575 /* NBMetadataHelper.m */,
|
|
||||||
D03B0C871D6222CA00955575 /* NBNumberFormat.h */,
|
|
||||||
D03B0C881D6222CA00955575 /* NBNumberFormat.m */,
|
|
||||||
D03B0C891D6222CA00955575 /* NBPhoneMetaData.h */,
|
|
||||||
D03B0C8A1D6222CA00955575 /* NBPhoneMetaData.m */,
|
|
||||||
D03B0C8B1D6222CA00955575 /* NBPhoneMetaDataGenerator.h */,
|
|
||||||
D03B0C8C1D6222CA00955575 /* NBPhoneMetaDataGenerator.m */,
|
|
||||||
D03B0C8D1D6222CA00955575 /* NBPhoneNumber.h */,
|
|
||||||
D03B0C8E1D6222CA00955575 /* NBPhoneNumber.m */,
|
|
||||||
D03B0C8F1D6222CA00955575 /* NBPhoneNumberDefines.h */,
|
|
||||||
D03B0C901D6222CA00955575 /* NBPhoneNumberDefines.m */,
|
|
||||||
D03B0C911D6222CA00955575 /* NBPhoneNumberDesc.h */,
|
|
||||||
D03B0C921D6222CA00955575 /* NBPhoneNumberDesc.m */,
|
|
||||||
D03B0C931D6222CA00955575 /* NBPhoneNumberUtil.h */,
|
|
||||||
D03B0C941D6222CA00955575 /* NBPhoneNumberUtil.m */,
|
|
||||||
);
|
);
|
||||||
name = "libphonenumber-iOS";
|
name = "libphonenumber-iOS";
|
||||||
path = "third-party/libphonenumber-iOS";
|
path = "third-party/libphonenumber-iOS";
|
||||||
@ -319,8 +317,11 @@
|
|||||||
children = (
|
children = (
|
||||||
D03B0CDA1D62245F00955575 /* ApiUtils.swift */,
|
D03B0CDA1D62245F00955575 /* ApiUtils.swift */,
|
||||||
D03B0CD81D62245B00955575 /* PeerUtils.swift */,
|
D03B0CD81D62245B00955575 /* PeerUtils.swift */,
|
||||||
|
D09A2FEA1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift */,
|
||||||
D03B0CD41D62245300955575 /* TelegramUser.swift */,
|
D03B0CD41D62245300955575 /* TelegramUser.swift */,
|
||||||
D03B0CD51D62245300955575 /* TelegramGroup.swift */,
|
D03B0CD51D62245300955575 /* TelegramGroup.swift */,
|
||||||
|
D09A2FE51D7CD4940018FB72 /* TelegramChannel.swift */,
|
||||||
|
D0B417C01D7DCEEF004562A4 /* ApiGroupOrChannel.swift */,
|
||||||
);
|
);
|
||||||
name = Peers;
|
name = Peers;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -356,7 +357,6 @@
|
|||||||
D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */,
|
D03B0CEF1D62250800955575 /* TelegramMediaImage.swift */,
|
||||||
D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */,
|
D03B0CF01D62250800955575 /* TelegramMediaLocation.swift */,
|
||||||
D03B0CF11D62250800955575 /* TelegramMediaMap.swift */,
|
D03B0CF11D62250800955575 /* TelegramMediaMap.swift */,
|
||||||
D03B0CF21D62250800955575 /* TelegramMediaVoiceNote.swift */,
|
|
||||||
D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */,
|
D03B0CF31D62250800955575 /* TelegramMediaWebpage.swift */,
|
||||||
);
|
);
|
||||||
name = Media;
|
name = Media;
|
||||||
@ -455,6 +455,11 @@
|
|||||||
D06706631D512ADA00DED3E3 /* Frameworks */ = {
|
D06706631D512ADA00DED3E3 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D0B4187E1D7E054E004562A4 /* MtProtoKitMac.framework */,
|
||||||
|
D0B418701D7E0409004562A4 /* PostboxMac.framework */,
|
||||||
|
D0B418711D7E0409004562A4 /* SwiftSignalKitMac.framework */,
|
||||||
|
D0CAF2E91D75EC600011F558 /* MtProtoKitDynamic.framework */,
|
||||||
|
D0AC49491D7097A400AA55DA /* SSignalKit.framework */,
|
||||||
D03B0E6B1D63283C00955575 /* libiconv.tbd */,
|
D03B0E6B1D63283C00955575 /* libiconv.tbd */,
|
||||||
D03B0E691D63283000955575 /* libwebp.a */,
|
D03B0E691D63283000955575 /* libwebp.a */,
|
||||||
D03B0E611D63281A00955575 /* libavcodec.a */,
|
D03B0E611D63281A00955575 /* libavcodec.a */,
|
||||||
@ -479,6 +484,7 @@
|
|||||||
D03B0E591D63215200955575 /* TelegramCore.xcconfig */,
|
D03B0E591D63215200955575 /* TelegramCore.xcconfig */,
|
||||||
D09D8C031D4FAB1D0081DBEC /* TelegramCore */,
|
D09D8C031D4FAB1D0081DBEC /* TelegramCore */,
|
||||||
D09D8C0E1D4FAB1D0081DBEC /* TelegramCoreTests */,
|
D09D8C0E1D4FAB1D0081DBEC /* TelegramCoreTests */,
|
||||||
|
D0B418681D7E03D5004562A4 /* TelegramCoreMac */,
|
||||||
D09D8C021D4FAB1D0081DBEC /* Products */,
|
D09D8C021D4FAB1D0081DBEC /* Products */,
|
||||||
D06706631D512ADA00DED3E3 /* Frameworks */,
|
D06706631D512ADA00DED3E3 /* Frameworks */,
|
||||||
);
|
);
|
||||||
@ -489,6 +495,7 @@
|
|||||||
children = (
|
children = (
|
||||||
D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */,
|
D09D8C011D4FAB1D0081DBEC /* TelegramCore.framework */,
|
||||||
D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */,
|
D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */,
|
||||||
|
D0B418671D7E03D5004562A4 /* TelegramCoreMac.framework */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -521,6 +528,15 @@
|
|||||||
path = TelegramCoreTests;
|
path = TelegramCoreTests;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
D0B418681D7E03D5004562A4 /* TelegramCoreMac */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
D0B418691D7E03D5004562A4 /* TelegramCoreMac.h */,
|
||||||
|
D0B4186A1D7E03D5004562A4 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = TelegramCoreMac;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXHeadersBuildPhase section */
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
@ -528,22 +544,19 @@
|
|||||||
isa = PBXHeadersBuildPhase;
|
isa = PBXHeadersBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
D03B0CA11D6222CA00955575 /* NBNumberFormat.h in Headers */,
|
|
||||||
D03B0CA91D6222CA00955575 /* NBPhoneNumberDefines.h in Headers */,
|
|
||||||
D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */,
|
D03B0E431D631E6600955575 /* NetworkLogging.h in Headers */,
|
||||||
D03B0C9B1D6222CA00955575 /* NBMetadataCoreTest.h in Headers */,
|
|
||||||
D03B0CAB1D6222CA00955575 /* NBPhoneNumberDesc.h in Headers */,
|
|
||||||
D03B0CA51D6222CA00955575 /* NBPhoneMetaDataGenerator.h in Headers */,
|
|
||||||
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */,
|
D09D8C121D4FAB1D0081DBEC /* TelegramCore.h in Headers */,
|
||||||
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */,
|
D03B0E5C1D63241D00955575 /* TelegramCoreIncludes.h in Headers */,
|
||||||
D03B0CA31D6222CA00955575 /* NBPhoneMetaData.h in Headers */,
|
);
|
||||||
D03B0CA71D6222CA00955575 /* NBPhoneNumber.h in Headers */,
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
D03B0C951D6222CA00955575 /* NBAsYouTypeFormatter.h in Headers */,
|
};
|
||||||
D03B0C9F1D6222CA00955575 /* NBMetadataHelper.h in Headers */,
|
D0B418641D7E03D5004562A4 /* Headers */ = {
|
||||||
D03B0C971D6222CA00955575 /* NBMetadataCore.h in Headers */,
|
isa = PBXHeadersBuildPhase;
|
||||||
D03B0C991D6222CA00955575 /* NBMetadataCoreMapper.h in Headers */,
|
buildActionMask = 2147483647;
|
||||||
D03B0CAD1D6222CA00955575 /* NBPhoneNumberUtil.h in Headers */,
|
files = (
|
||||||
D03B0C9D1D6222CA00955575 /* NBMetadataCoreTestMapper.h in Headers */,
|
D0B4186B1D7E03D5004562A4 /* TelegramCoreMac.h in Headers */,
|
||||||
|
D0B418BC1D7E05D0004562A4 /* TelegramCoreIncludes.h in Headers */,
|
||||||
|
D0B418BB1D7E05BE004562A4 /* NetworkLogging.h in Headers */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -586,6 +599,24 @@
|
|||||||
productReference = D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */;
|
productReference = D09D8C0A1D4FAB1D0081DBEC /* TelegramCoreTests.xctest */;
|
||||||
productType = "com.apple.product-type.bundle.unit-test";
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
};
|
};
|
||||||
|
D0B418661D7E03D5004562A4 /* TelegramCoreMac */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = D0B4186C1D7E03D5004562A4 /* Build configuration list for PBXNativeTarget "TelegramCoreMac" */;
|
||||||
|
buildPhases = (
|
||||||
|
D0B418621D7E03D5004562A4 /* Sources */,
|
||||||
|
D0B418631D7E03D5004562A4 /* Frameworks */,
|
||||||
|
D0B418641D7E03D5004562A4 /* Headers */,
|
||||||
|
D0B418651D7E03D5004562A4 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = TelegramCoreMac;
|
||||||
|
productName = TelegramCoreMac;
|
||||||
|
productReference = D0B418671D7E03D5004562A4 /* TelegramCoreMac.framework */;
|
||||||
|
productType = "com.apple.product-type.framework";
|
||||||
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
/* Begin PBXProject section */
|
||||||
@ -608,6 +639,10 @@
|
|||||||
DevelopmentTeamName = "TELEGRAM MESSENGER LLP";
|
DevelopmentTeamName = "TELEGRAM MESSENGER LLP";
|
||||||
ProvisioningStyle = Automatic;
|
ProvisioningStyle = Automatic;
|
||||||
};
|
};
|
||||||
|
D0B418661D7E03D5004562A4 = {
|
||||||
|
CreatedOnToolsVersion = 8.0;
|
||||||
|
ProvisioningStyle = Manual;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
buildConfigurationList = D09D8BFB1D4FAB1D0081DBEC /* Build configuration list for PBXProject "TelegramCore" */;
|
buildConfigurationList = D09D8BFB1D4FAB1D0081DBEC /* Build configuration list for PBXProject "TelegramCore" */;
|
||||||
@ -624,6 +659,7 @@
|
|||||||
targets = (
|
targets = (
|
||||||
D09D8C001D4FAB1D0081DBEC /* TelegramCore */,
|
D09D8C001D4FAB1D0081DBEC /* TelegramCore */,
|
||||||
D09D8C091D4FAB1D0081DBEC /* TelegramCoreTests */,
|
D09D8C091D4FAB1D0081DBEC /* TelegramCoreTests */,
|
||||||
|
D0B418661D7E03D5004562A4 /* TelegramCoreMac */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@ -643,6 +679,13 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
D0B418651D7E03D5004562A4 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
@ -655,21 +698,16 @@
|
|||||||
D03B0CB91D62233400955575 /* Either.swift in Sources */,
|
D03B0CB91D62233400955575 /* Either.swift in Sources */,
|
||||||
D03B0CBD1D62234300955575 /* Regex.swift in Sources */,
|
D03B0CBD1D62234300955575 /* Regex.swift in Sources */,
|
||||||
D03B0D661D631A8B00955575 /* AccountSettings.swift in Sources */,
|
D03B0D661D631A8B00955575 /* AccountSettings.swift in Sources */,
|
||||||
|
D09A2FE61D7CD4940018FB72 /* TelegramChannel.swift in Sources */,
|
||||||
D03B0D0E1D62255C00955575 /* UpdateGroup.swift in Sources */,
|
D03B0D0E1D62255C00955575 /* UpdateGroup.swift in Sources */,
|
||||||
D03B0CF71D62250800955575 /* TelegramMediaImage.swift in Sources */,
|
D03B0CF71D62250800955575 /* TelegramMediaImage.swift in Sources */,
|
||||||
D03B0CAC1D6222CA00955575 /* NBPhoneNumberDesc.m in Sources */,
|
|
||||||
D03B0D6B1D631A9D00955575 /* Phonebook.swift in Sources */,
|
D03B0D6B1D631A9D00955575 /* Phonebook.swift in Sources */,
|
||||||
D03B0D3D1D6319E200955575 /* Fetch.swift in Sources */,
|
D03B0D3D1D6319E200955575 /* Fetch.swift in Sources */,
|
||||||
D03B0CA01D6222CA00955575 /* NBMetadataHelper.m in Sources */,
|
|
||||||
D03B0CAE1D6222CA00955575 /* NBPhoneNumberUtil.m in Sources */,
|
|
||||||
D03B0D4E1D631A3800955575 /* DownloadFromCloudLocation.swift in Sources */,
|
D03B0D4E1D631A3800955575 /* DownloadFromCloudLocation.swift in Sources */,
|
||||||
D03B0D681D631A8B00955575 /* RecentPeers.swift in Sources */,
|
D03B0D681D631A8B00955575 /* RecentPeers.swift in Sources */,
|
||||||
D03B0C9E1D6222CA00955575 /* NBMetadataCoreTestMapper.m in Sources */,
|
|
||||||
D03B0D5F1D631A6900955575 /* Serialization.swift in Sources */,
|
D03B0D5F1D631A6900955575 /* Serialization.swift in Sources */,
|
||||||
D03B0D441D6319F900955575 /* CloudFileMediaResource.swift in Sources */,
|
D03B0D441D6319F900955575 /* CloudFileMediaResource.swift in Sources */,
|
||||||
D03B0C961D6222CA00955575 /* NBAsYouTypeFormatter.m in Sources */,
|
|
||||||
D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */,
|
D0AB0B921D65E9FA002C78E7 /* ManagedServiceViews.swift in Sources */,
|
||||||
D03B0CA21D6222CA00955575 /* NBNumberFormat.m in Sources */,
|
|
||||||
D03B0CCE1D62239600955575 /* PhoneNumbers.swift in Sources */,
|
D03B0CCE1D62239600955575 /* PhoneNumbers.swift in Sources */,
|
||||||
D03B0D5A1D631A6900955575 /* Api.swift in Sources */,
|
D03B0D5A1D631A6900955575 /* Api.swift in Sources */,
|
||||||
D03B0CDB1D62245F00955575 /* ApiUtils.swift in Sources */,
|
D03B0CDB1D62245F00955575 /* ApiUtils.swift in Sources */,
|
||||||
@ -679,25 +717,20 @@
|
|||||||
D03B0D5E1D631A6900955575 /* Network.swift in Sources */,
|
D03B0D5E1D631A6900955575 /* Network.swift in Sources */,
|
||||||
D03B0CF51D62250800955575 /* TelegramMediaContact.swift in Sources */,
|
D03B0CF51D62250800955575 /* TelegramMediaContact.swift in Sources */,
|
||||||
D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */,
|
D03B0CFB1D62250800955575 /* TelegramMediaWebpage.swift in Sources */,
|
||||||
|
D09A2FEB1D7CDC320018FB72 /* PeerAccessRestrictionInfo.swift in Sources */,
|
||||||
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */,
|
D0AB0B981D664E18002C78E7 /* ManagedUnsentMessageIndices.swift in Sources */,
|
||||||
D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */,
|
D03B0CF91D62250800955575 /* TelegramMediaMap.swift in Sources */,
|
||||||
D03B0D671D631A8B00955575 /* AccountViewTracker.swift in Sources */,
|
D03B0D671D631A8B00955575 /* AccountViewTracker.swift in Sources */,
|
||||||
D03B0D101D62255C00955575 /* UpdatesApiUtils.swift in Sources */,
|
D03B0D101D62255C00955575 /* UpdatesApiUtils.swift in Sources */,
|
||||||
D03B0CBF1D62234A00955575 /* Log.swift in Sources */,
|
D03B0CBF1D62234A00955575 /* Log.swift in Sources */,
|
||||||
D03B0CD61D62245300955575 /* TelegramUser.swift in Sources */,
|
D03B0CD61D62245300955575 /* TelegramUser.swift in Sources */,
|
||||||
D03B0C9C1D6222CA00955575 /* NBMetadataCoreTest.m in Sources */,
|
|
||||||
D03B0CD91D62245B00955575 /* PeerUtils.swift in Sources */,
|
D03B0CD91D62245B00955575 /* PeerUtils.swift in Sources */,
|
||||||
D03B0CE41D62249F00955575 /* TextEntitiesMessageAttribute.swift in Sources */,
|
D03B0CE41D62249F00955575 /* TextEntitiesMessageAttribute.swift in Sources */,
|
||||||
D03B0C9A1D6222CA00955575 /* NBMetadataCoreMapper.m in Sources */,
|
|
||||||
D03B0CD31D62244300955575 /* Namespaces.swift in Sources */,
|
D03B0CD31D62244300955575 /* Namespaces.swift in Sources */,
|
||||||
D03B0D6D1D631AA300955575 /* ContactManagement.swift in Sources */,
|
D03B0D6D1D631AA300955575 /* ContactManagement.swift in Sources */,
|
||||||
D03B0D0F1D62255C00955575 /* UpdateMessageService.swift in Sources */,
|
D03B0D0F1D62255C00955575 /* UpdateMessageService.swift in Sources */,
|
||||||
D03B0CF61D62250800955575 /* TelegramMediaFile.swift in Sources */,
|
D03B0CF61D62250800955575 /* TelegramMediaFile.swift in Sources */,
|
||||||
D03B0C981D6222CA00955575 /* NBMetadataCore.m in Sources */,
|
|
||||||
D03B0CE81D6224AD00955575 /* ViewCountMessageAttribute.swift in Sources */,
|
D03B0CE81D6224AD00955575 /* ViewCountMessageAttribute.swift in Sources */,
|
||||||
D03B0CA41D6222CA00955575 /* NBPhoneMetaData.m in Sources */,
|
|
||||||
D03B0CAA1D6222CA00955575 /* NBPhoneNumberDefines.m in Sources */,
|
|
||||||
D03B0CA61D6222CA00955575 /* NBPhoneMetaDataGenerator.m in Sources */,
|
|
||||||
D03B0D0C1D62255C00955575 /* StateManagement.swift in Sources */,
|
D03B0D0C1D62255C00955575 /* StateManagement.swift in Sources */,
|
||||||
D03B0D721D631ABA00955575 /* SearchMessages.swift in Sources */,
|
D03B0D721D631ABA00955575 /* SearchMessages.swift in Sources */,
|
||||||
D03B0D5C1D631A6900955575 /* Download.swift in Sources */,
|
D03B0D5C1D631A6900955575 /* Download.swift in Sources */,
|
||||||
@ -709,13 +742,12 @@
|
|||||||
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */,
|
D0AB0B9A1D666520002C78E7 /* ManagedSynchronizePeerReadStates.swift in Sources */,
|
||||||
D03B0D5B1D631A6900955575 /* Buffer.swift in Sources */,
|
D03B0D5B1D631A6900955575 /* Buffer.swift in Sources */,
|
||||||
D03B0E441D631E6600955575 /* NetworkLogging.m in Sources */,
|
D03B0E441D631E6600955575 /* NetworkLogging.m in Sources */,
|
||||||
D03B0CA81D6222CA00955575 /* NBPhoneNumber.m in Sources */,
|
|
||||||
D03B0CFA1D62250800955575 /* TelegramMediaVoiceNote.swift in Sources */,
|
|
||||||
D03B0CBB1D62233C00955575 /* MergeLists.swift in Sources */,
|
D03B0CBB1D62233C00955575 /* MergeLists.swift in Sources */,
|
||||||
D03B0CC11D62235000955575 /* StringFormat.swift in Sources */,
|
D03B0CC11D62235000955575 /* StringFormat.swift in Sources */,
|
||||||
D03B0D651D631A8B00955575 /* Account.swift in Sources */,
|
D03B0D651D631A8B00955575 /* Account.swift in Sources */,
|
||||||
D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */,
|
D0AB0B941D662ECE002C78E7 /* ManagedMessageHistoryHoles.swift in Sources */,
|
||||||
D03B0CF41D62250800955575 /* TelegramMediaAction.swift in Sources */,
|
D03B0CF41D62250800955575 /* TelegramMediaAction.swift in Sources */,
|
||||||
|
D0B417C11D7DCEEF004562A4 /* ApiGroupOrChannel.swift in Sources */,
|
||||||
D03B0D0B1D62255C00955575 /* SendUnsentMessage.swift in Sources */,
|
D03B0D0B1D62255C00955575 /* SendUnsentMessage.swift in Sources */,
|
||||||
D03B0D0D1D62255C00955575 /* SynchronizePeerReadState.swift in Sources */,
|
D03B0D0D1D62255C00955575 /* SynchronizePeerReadState.swift in Sources */,
|
||||||
D03B0D081D62255C00955575 /* ChannelState.swift in Sources */,
|
D03B0D081D62255C00955575 /* ChannelState.swift in Sources */,
|
||||||
@ -730,6 +762,71 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
D0B418621D7E03D5004562A4 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
D0B418A71D7E0592004562A4 /* Fetch.swift in Sources */,
|
||||||
|
D0B418A51D7E058E004562A4 /* DownloadFromCloudLocation.swift in Sources */,
|
||||||
|
D0B418931D7E0580004562A4 /* TelegramMediaCloudLocations.swift in Sources */,
|
||||||
|
D0B418911D7E057C004562A4 /* TextEntitiesMessageAttribute.swift in Sources */,
|
||||||
|
D0B4189E1D7E0587004562A4 /* Holes.swift in Sources */,
|
||||||
|
D0B418B81D7E05A6004562A4 /* ContactManagement.swift in Sources */,
|
||||||
|
D0B418AC1D7E0597004562A4 /* Network.swift in Sources */,
|
||||||
|
D0B418981D7E0580004562A4 /* TelegramMediaLocation.swift in Sources */,
|
||||||
|
D0B4189C1D7E0587004562A4 /* ChannelState.swift in Sources */,
|
||||||
|
D0B4188B1D7E0573004562A4 /* TelegramGroup.swift in Sources */,
|
||||||
|
D0B418A41D7E0587004562A4 /* UpdatesApiUtils.swift in Sources */,
|
||||||
|
D0B418A81D7E0597004562A4 /* Api.swift in Sources */,
|
||||||
|
D0B418A31D7E0587004562A4 /* UpdateMessageService.swift in Sources */,
|
||||||
|
D0B418811D7E0567004562A4 /* MergeLists.swift in Sources */,
|
||||||
|
D0B418951D7E0580004562A4 /* TelegramMediaContact.swift in Sources */,
|
||||||
|
D0B418AF1D7E059F004562A4 /* AccountSettings.swift in Sources */,
|
||||||
|
D0B418851D7E0567004562A4 /* PhoneNumbers.swift in Sources */,
|
||||||
|
D0B418AE1D7E059F004562A4 /* Account.swift in Sources */,
|
||||||
|
D0B418841D7E0567004562A4 /* StringFormat.swift in Sources */,
|
||||||
|
D0B418901D7E057C004562A4 /* ReplyMessageAttribute.swift in Sources */,
|
||||||
|
D0B418801D7E0567004562A4 /* Either.swift in Sources */,
|
||||||
|
D0B418871D7E0573004562A4 /* ApiUtils.swift in Sources */,
|
||||||
|
D0B418831D7E0567004562A4 /* Log.swift in Sources */,
|
||||||
|
D0B418961D7E0580004562A4 /* TelegramMediaFile.swift in Sources */,
|
||||||
|
D0B4189B1D7E0580004562A4 /* TelegramMediaWebpage.swift in Sources */,
|
||||||
|
D0B418B31D7E059F004562A4 /* ManagedMessageHistoryHoles.swift in Sources */,
|
||||||
|
D0B418921D7E057C004562A4 /* InlineBotMessageAttribute.swift in Sources */,
|
||||||
|
D0B418A61D7E0592004562A4 /* CloudFileMediaResource.swift in Sources */,
|
||||||
|
D0B418A91D7E0597004562A4 /* Buffer.swift in Sources */,
|
||||||
|
D0B418B91D7E05AD004562A4 /* SearchMessages.swift in Sources */,
|
||||||
|
D0B4188F1D7E057C004562A4 /* ViewCountMessageAttribute.swift in Sources */,
|
||||||
|
D0B4188A1D7E0573004562A4 /* TelegramUser.swift in Sources */,
|
||||||
|
D0B4189D1D7E0587004562A4 /* EnqueueMessage.swift in Sources */,
|
||||||
|
D0B4188C1D7E0573004562A4 /* TelegramChannel.swift in Sources */,
|
||||||
|
D0B418B61D7E059F004562A4 /* ManagedSynchronizePeerReadStates.swift in Sources */,
|
||||||
|
D0B418AA1D7E0597004562A4 /* Download.swift in Sources */,
|
||||||
|
D0B418A01D7E0587004562A4 /* StateManagement.swift in Sources */,
|
||||||
|
D0B4188E1D7E0578004562A4 /* StoreMessage_Telegram.swift in Sources */,
|
||||||
|
D0B418991D7E0580004562A4 /* TelegramMediaMap.swift in Sources */,
|
||||||
|
D0B4188D1D7E0573004562A4 /* ApiGroupOrChannel.swift in Sources */,
|
||||||
|
D0B418BA1D7E05BB004562A4 /* NetworkLogging.m in Sources */,
|
||||||
|
D0B418B41D7E059F004562A4 /* ManagedChatListHoles.swift in Sources */,
|
||||||
|
D0B418A21D7E0587004562A4 /* UpdateGroup.swift in Sources */,
|
||||||
|
D0B418A11D7E0587004562A4 /* SynchronizePeerReadState.swift in Sources */,
|
||||||
|
D0B418B21D7E059F004562A4 /* ManagedServiceViews.swift in Sources */,
|
||||||
|
D0B418891D7E0573004562A4 /* PeerAccessRestrictionInfo.swift in Sources */,
|
||||||
|
D0B418941D7E0580004562A4 /* TelegramMediaAction.swift in Sources */,
|
||||||
|
D0B418821D7E0567004562A4 /* Regex.swift in Sources */,
|
||||||
|
D0B418AB1D7E0597004562A4 /* MultipartFetch.swift in Sources */,
|
||||||
|
D0B418B71D7E05A6004562A4 /* Phonebook.swift in Sources */,
|
||||||
|
D0B418861D7E056D004562A4 /* Namespaces.swift in Sources */,
|
||||||
|
D0B418AD1D7E0597004562A4 /* Serialization.swift in Sources */,
|
||||||
|
D0B418881D7E0573004562A4 /* PeerUtils.swift in Sources */,
|
||||||
|
D0B4189F1D7E0587004562A4 /* SendUnsentMessage.swift in Sources */,
|
||||||
|
D0B418B51D7E059F004562A4 /* ManagedUnsentMessageIndices.swift in Sources */,
|
||||||
|
D0B418971D7E0580004562A4 /* TelegramMediaImage.swift in Sources */,
|
||||||
|
D0B418B11D7E059F004562A4 /* RecentPeers.swift in Sources */,
|
||||||
|
D0B418B01D7E059F004562A4 /* AccountViewTracker.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
/* End PBXSourcesBuildPhase section */
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXTargetDependency section */
|
/* Begin PBXTargetDependency section */
|
||||||
@ -775,7 +872,8 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
@ -795,6 +893,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = X834Q8SBVP;
|
DEVELOPMENT_TEAM = X834Q8SBVP;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
@ -809,7 +908,7 @@
|
|||||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||||
);
|
);
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -870,7 +969,8 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@ -915,7 +1015,8 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
@ -949,7 +1050,7 @@
|
|||||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||||
);
|
);
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -968,6 +1069,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = X834Q8SBVP;
|
DEVELOPMENT_TEAM = X834Q8SBVP;
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
@ -982,7 +1084,7 @@
|
|||||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||||
);
|
);
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
@ -1014,6 +1116,88 @@
|
|||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
D0B4186D1D7E03D5004562A4 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
FRAMEWORK_VERSION = A;
|
||||||
|
INFOPLIST_FILE = TelegramCoreMac/Info.plist;
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 3.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
D0B4186E1D7E03D5004562A4 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
FRAMEWORK_VERSION = A;
|
||||||
|
INFOPLIST_FILE = TelegramCoreMac/Info.plist;
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
SWIFT_VERSION = 3.0;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
D0B4186F1D7E03D5004562A4 /* Hockeyapp */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
APPLICATION_EXTENSION_API_ONLY = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
DEFINES_MODULE = YES;
|
||||||
|
DEVELOPMENT_TEAM = "";
|
||||||
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
FRAMEWORK_VERSION = A;
|
||||||
|
INFOPLIST_FILE = TelegramCoreMac/Info.plist;
|
||||||
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SDKROOT = macosx;
|
||||||
|
SKIP_INSTALL = YES;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
SWIFT_VERSION = 3.0;
|
||||||
|
};
|
||||||
|
name = Hockeyapp;
|
||||||
|
};
|
||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
@ -1047,6 +1231,16 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
|
D0B4186C1D7E03D5004562A4 /* Build configuration list for PBXNativeTarget "TelegramCoreMac" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
D0B4186D1D7E03D5004562A4 /* Debug */,
|
||||||
|
D0B4186E1D7E03D5004562A4 /* Release */,
|
||||||
|
D0B4186F1D7E03D5004562A4 /* Hockeyapp */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
};
|
};
|
||||||
rootObject = D09D8BF81D4FAB1D0081DBEC /* Project object */;
|
rootObject = D09D8BF81D4FAB1D0081DBEC /* Project object */;
|
||||||
|
|||||||
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "0800"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D0B418661D7E03D5004562A4"
|
||||||
|
BuildableName = "TelegramCoreMac.framework"
|
||||||
|
BlueprintName = "TelegramCoreMac"
|
||||||
|
ReferencedContainer = "container:TelegramCore.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D0B418661D7E03D5004562A4"
|
||||||
|
BuildableName = "TelegramCoreMac.framework"
|
||||||
|
BlueprintName = "TelegramCoreMac"
|
||||||
|
ReferencedContainer = "container:TelegramCore.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "D0B418661D7E03D5004562A4"
|
||||||
|
BuildableName = "TelegramCoreMac.framework"
|
||||||
|
BlueprintName = "TelegramCoreMac"
|
||||||
|
ReferencedContainer = "container:TelegramCore.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@ -9,6 +9,11 @@
|
|||||||
<key>orderHint</key>
|
<key>orderHint</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>TelegramCoreMac.xcscheme</key>
|
||||||
|
<dict>
|
||||||
|
<key>orderHint</key>
|
||||||
|
<integer>26</integer>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>SuppressBuildableAutocreation</key>
|
<key>SuppressBuildableAutocreation</key>
|
||||||
<dict>
|
<dict>
|
||||||
@ -22,6 +27,11 @@
|
|||||||
<key>primary</key>
|
<key>primary</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>D0B418661D7E03D5004562A4</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
import MtProtoKit
|
import SwiftSignalKitMac
|
||||||
import Display
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
import TelegramCorePrivateModule
|
import TelegramCorePrivateModule
|
||||||
|
|
||||||
public struct AccountId {
|
public struct AccountId {
|
||||||
@ -168,20 +173,23 @@ public class UnauthorizedAccount {
|
|||||||
self.network = network
|
self.network = network
|
||||||
}
|
}
|
||||||
|
|
||||||
public func changedMasterDatacenterId(_ masterDatacenterId: Int32) -> UnauthorizedAccount {
|
public func changedMasterDatacenterId(_ masterDatacenterId: Int32) -> Signal<UnauthorizedAccount, NoError> {
|
||||||
if masterDatacenterId == Int32(self.network.mtProto.datacenterId) {
|
if masterDatacenterId == Int32(self.network.mtProto.datacenterId) {
|
||||||
return self
|
return .single(self)
|
||||||
} else {
|
} else {
|
||||||
let postbox = self.postbox
|
let postbox = self.postbox
|
||||||
let keychain = Keychain(get: { key in
|
let keychain = Keychain(get: { key in
|
||||||
return postbox.keychainEntryForKey(key)
|
return postbox.keychainEntryForKey(key)
|
||||||
}, set: { (key, data) in
|
}, set: { (key, data) in
|
||||||
postbox.setKeychainEntryForKey(key, value: data)
|
postbox.setKeychainEntryForKey(key, value: data)
|
||||||
}, remove: { key in
|
}, remove: { key in
|
||||||
postbox.removeKeychainEntryForKey(key)
|
postbox.removeKeychainEntryForKey(key)
|
||||||
})
|
})
|
||||||
|
|
||||||
return UnauthorizedAccount(id: self.id, postbox: self.postbox, network: Network(datacenterId: Int(masterDatacenterId), keychain: keychain))
|
return initializedNetwork(datacenterId: Int(masterDatacenterId), keychain: keychain)
|
||||||
|
|> map { network in
|
||||||
|
return UnauthorizedAccount(id: self.id, postbox: self.postbox, network: network)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -191,9 +199,9 @@ private var declaredEncodables: Void = {
|
|||||||
declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) })
|
declareEncodable(AuthorizedAccountState.self, f: { AuthorizedAccountState(decoder: $0) })
|
||||||
declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) })
|
declareEncodable(TelegramUser.self, f: { TelegramUser(decoder: $0) })
|
||||||
declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) })
|
declareEncodable(TelegramGroup.self, f: { TelegramGroup(decoder: $0) })
|
||||||
|
declareEncodable(TelegramChannel.self, f: { TelegramChannel(decoder: $0) })
|
||||||
declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) })
|
declareEncodable(TelegramMediaImage.self, f: { TelegramMediaImage(decoder: $0) })
|
||||||
declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) })
|
declareEncodable(TelegramMediaImageRepresentation.self, f: { TelegramMediaImageRepresentation(decoder: $0) })
|
||||||
declareEncodable(TelegramMediaVoiceNote.self, f: { TelegramMediaVoiceNote(decoder: $0) })
|
|
||||||
declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) })
|
declareEncodable(TelegramMediaContact.self, f: { TelegramMediaContact(decoder: $0) })
|
||||||
declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) })
|
declareEncodable(TelegramMediaMap.self, f: { TelegramMediaMap(decoder: $0) })
|
||||||
declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) })
|
declareEncodable(TelegramMediaFile.self, f: { TelegramMediaFile(decoder: $0) })
|
||||||
@ -226,7 +234,7 @@ public func accountWithId(_ id: AccountId, appGroupPath: String) -> Signal<Eithe
|
|||||||
subscriber.putNext(pair)
|
subscriber.putNext(pair)
|
||||||
subscriber.putCompletion()
|
subscriber.putCompletion()
|
||||||
})
|
})
|
||||||
} |> map { (postbox, accountState) in
|
} |> mapToSignal { (postbox, accountState) -> Signal<Either<UnauthorizedAccount, Account>, NoError> in
|
||||||
let keychain = Keychain(get: { key in
|
let keychain = Keychain(get: { key in
|
||||||
return postbox.keychainEntryForKey(key)
|
return postbox.keychainEntryForKey(key)
|
||||||
}, set: { (key, data) in
|
}, set: { (key, data) in
|
||||||
@ -238,15 +246,24 @@ public func accountWithId(_ id: AccountId, appGroupPath: String) -> Signal<Eithe
|
|||||||
if let accountState = accountState {
|
if let accountState = accountState {
|
||||||
switch accountState {
|
switch accountState {
|
||||||
case let unauthorizedState as UnauthorizedAccountState:
|
case let unauthorizedState as UnauthorizedAccountState:
|
||||||
return .left(value: UnauthorizedAccount(id: id, postbox: postbox, network: Network(datacenterId: Int(unauthorizedState.masterDatacenterId), keychain: keychain)))
|
return initializedNetwork(datacenterId: Int(unauthorizedState.masterDatacenterId), keychain: keychain)
|
||||||
|
|> map { network -> Either<UnauthorizedAccount, Account> in
|
||||||
|
.left(value: UnauthorizedAccount(id: id, postbox: postbox, network: network))
|
||||||
|
}
|
||||||
case let authorizedState as AuthorizedAccountState:
|
case let authorizedState as AuthorizedAccountState:
|
||||||
return .right(value: Account(id: id, postbox: postbox, network: Network(datacenterId: Int(authorizedState.masterDatacenterId), keychain: keychain), peerId: authorizedState.peerId))
|
return initializedNetwork(datacenterId: Int(authorizedState.masterDatacenterId), keychain: keychain)
|
||||||
|
|> map { network -> Either<UnauthorizedAccount, Account> in
|
||||||
|
return .right(value: Account(id: id, postbox: postbox, network: network, peerId: authorizedState.peerId))
|
||||||
|
}
|
||||||
case _:
|
case _:
|
||||||
assertionFailure("Unexpected accountState \(accountState)")
|
assertionFailure("Unexpected accountState \(accountState)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return .left(value: UnauthorizedAccount(id: id, postbox: postbox, network: Network(datacenterId: 2, keychain: keychain)))
|
return initializedNetwork(datacenterId: 2, keychain: keychain)
|
||||||
|
|> map { network -> Either<UnauthorizedAccount, Account> in
|
||||||
|
return .left(value: UnauthorizedAccount(id: id, postbox: postbox, network: network))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,10 +363,16 @@ public class Account {
|
|||||||
|
|
||||||
let appVersionString = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "") (\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? ""))"
|
let appVersionString = "\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] ?? "") (\(Bundle.main.infoDictionary?["CFBundleVersion"] ?? ""))"
|
||||||
|
|
||||||
|
|
||||||
let langCode = NSLocale.preferredLanguages.first ?? "en"
|
let langCode = NSLocale.preferredLanguages.first ?? "en"
|
||||||
|
|
||||||
return network.request(Api.functions.account.registerDevice(tokenType: 1, token: tokenString, deviceModel: "iPhome Simulator", systemVersion: UIDevice.current.systemVersion, appVersion: appVersionString, appSandbox: .boolTrue, langCode: langCode))
|
#if os(macOS)
|
||||||
|
let pInfo = ProcessInfo.processInfo
|
||||||
|
let systemVersion = pInfo.operatingSystemVersionString
|
||||||
|
#else
|
||||||
|
let systemVersion = UIDevice.current.systemVersion
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return network.request(Api.functions.account.registerDevice(tokenType: 1, token: tokenString, deviceModel: "iPhome Simulator", systemVersion: systemVersion, appVersion: appVersionString, appSandbox: .boolTrue, langCode: langCode))
|
||||||
|> retryRequest
|
|> retryRequest
|
||||||
|> mapToSignal { _ -> Signal<Void, NoError> in
|
|> mapToSignal { _ -> Signal<Void, NoError> in
|
||||||
return .complete()
|
return .complete()
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public struct AutomaticDownloadSettings {
|
public struct AutomaticDownloadSettings {
|
||||||
public let downloadPhoto: Bool
|
public let downloadPhoto: Bool
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
import MtProtoKit
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
private func pendingWebpages(entries: [MessageHistoryEntry]) -> Set<MessageId> {
|
private func pendingWebpages(entries: [MessageHistoryEntry]) -> Set<MessageId> {
|
||||||
var messageIds = Set<MessageId>()
|
var messageIds = Set<MessageId>()
|
||||||
@ -54,8 +60,9 @@ private func fetchWebpage(account: Account, messageId: MessageId) -> Signal<Void
|
|||||||
return account.postbox.modify { modifier -> Void in
|
return account.postbox.modify { modifier -> Void in
|
||||||
var peers: [Peer] = []
|
var peers: [Peer] = []
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
let telegramGroup = TelegramGroup(chat: chat)
|
if let groupOrChannel = parseTelegramGroupOrChannel(chat: chat) {
|
||||||
peers.append(telegramGroup)
|
peers.append(groupOrChannel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for user in users {
|
for user in users {
|
||||||
let telegramUser = TelegramUser(user: user)
|
let telegramUser = TelegramUser(user: user)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
126
TelegramCore/ApiGroupOrChannel.swift
Normal file
126
TelegramCore/ApiGroupOrChannel.swift
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
import Foundation
|
||||||
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private func imageRepresentationsForApiChatPhoto(_ photo: Api.ChatPhoto) -> [TelegramMediaImageRepresentation] {
|
||||||
|
var telegramPhoto: [TelegramMediaImageRepresentation] = []
|
||||||
|
switch photo {
|
||||||
|
case let .chatPhoto(photoSmall, photoBig):
|
||||||
|
if let smallLocation = telegramMediaLocationFromApiLocation(photoSmall), let largeLocation = telegramMediaLocationFromApiLocation(photoBig) {
|
||||||
|
telegramPhoto.append(TelegramMediaImageRepresentation(dimensions: CGSize(width: 80.0, height: 80.0), location: smallLocation, size: nil))
|
||||||
|
telegramPhoto.append(TelegramMediaImageRepresentation(dimensions: CGSize(width: 640.0, height: 640.0), location: largeLocation, size: nil))
|
||||||
|
}
|
||||||
|
case .chatPhotoEmpty:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return telegramPhoto
|
||||||
|
}
|
||||||
|
|
||||||
|
func parseTelegramGroupOrChannel(chat: Api.Chat) -> Peer? {
|
||||||
|
switch chat {
|
||||||
|
case let .chat(flags, id, title, photo, participantsCount, date, version, migratedTo):
|
||||||
|
let left = (flags & (1 | 2)) != 0
|
||||||
|
return TelegramGroup(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), title: title, photo: imageRepresentationsForApiChatPhoto(photo), participantCount: Int(participantsCount), membership: left ? .Left : .Member, version: Int(version))
|
||||||
|
case let .chatEmpty(id):
|
||||||
|
TelegramGroup(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), title: "", photo: [], participantCount: 0, membership: .Removed, version: 0)
|
||||||
|
case let .chatForbidden(id, title):
|
||||||
|
TelegramGroup(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), title: title, photo: [], participantCount: 0, membership: .Removed, version: 0)
|
||||||
|
case let .channel(flags, id, accessHash, title, username, photo, date, version, restrictionReason):
|
||||||
|
let participationStatus: TelegramChannelParticipationStatus
|
||||||
|
if (flags & Int32(1 << 1)) != 0 {
|
||||||
|
participationStatus = .kicked
|
||||||
|
} else if (flags & Int32(1 << 2)) != 0 {
|
||||||
|
participationStatus = .left
|
||||||
|
} else {
|
||||||
|
participationStatus = .member
|
||||||
|
}
|
||||||
|
|
||||||
|
let role: TelegramChannelRole
|
||||||
|
if (flags & Int32(1 << 0)) != 0 {
|
||||||
|
role = .creator
|
||||||
|
} else if (flags & Int32(1 << 3)) != 0 {
|
||||||
|
role = .editor
|
||||||
|
} else if (flags & Int32(1 << 4)) != 0 {
|
||||||
|
role = .moderator
|
||||||
|
} else {
|
||||||
|
role = .member
|
||||||
|
}
|
||||||
|
|
||||||
|
let info: TelegramChannelInfo
|
||||||
|
if (flags & Int32(1 << 8)) != 0 {
|
||||||
|
var infoFlags = TelegramChannelGroupFlags()
|
||||||
|
if (flags & Int32(1 << 10)) != 0 {
|
||||||
|
infoFlags.insert(.everyMemberCanInviteMembers)
|
||||||
|
}
|
||||||
|
info = .group(TelegramChannelGroupInfo(flags: infoFlags))
|
||||||
|
} else {
|
||||||
|
var infoFlags = TelegramChannelBroadcastFlags()
|
||||||
|
if (flags & Int32(1 << 11)) != 0 {
|
||||||
|
infoFlags.insert(.messagesShouldHaveSignatures)
|
||||||
|
}
|
||||||
|
info = .broadcast(TelegramChannelBroadcastInfo(flags: []))
|
||||||
|
}
|
||||||
|
|
||||||
|
var channelFlags = TelegramChannelFlags()
|
||||||
|
if (flags & Int32(1 << 7)) != 0 {
|
||||||
|
channelFlags.insert(.verified)
|
||||||
|
}
|
||||||
|
|
||||||
|
let restrictionInfo: PeerAccessRestrictionInfo?
|
||||||
|
if let restrictionReason = restrictionReason {
|
||||||
|
restrictionInfo = PeerAccessRestrictionInfo(reason: restrictionReason)
|
||||||
|
} else {
|
||||||
|
restrictionInfo = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return TelegramChannel(id: PeerId(namespace: Namespaces.Peer.CloudChannel, id: id), accessHash: accessHash, title: title, username: username, photo: imageRepresentationsForApiChatPhoto(photo), creationDate: date, version: version, participationStatus: participationStatus, role: role, info: info, flags: channelFlags, restrictionInfo: restrictionInfo)
|
||||||
|
case let .channelForbidden(flags, id, accessHash, title):
|
||||||
|
let info: TelegramChannelInfo
|
||||||
|
if (flags & Int32(1 << 8)) != 0 {
|
||||||
|
var infoFlags = TelegramChannelGroupFlags()
|
||||||
|
info = .group(TelegramChannelGroupInfo(flags: infoFlags))
|
||||||
|
} else {
|
||||||
|
var infoFlags = TelegramChannelBroadcastFlags()
|
||||||
|
info = .broadcast(TelegramChannelBroadcastInfo(flags: []))
|
||||||
|
}
|
||||||
|
|
||||||
|
return TelegramChannel(id: PeerId(namespace: Namespaces.Peer.CloudChannel, id: id), accessHash: accessHash, title: title, username: nil, photo: [], creationDate: 0, version: 0, participationStatus: .kicked, role: .member, info: info, flags: TelegramChannelFlags(), restrictionInfo: nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func mergeGroupOrChannel(lhs: Peer?, rhs: Api.Chat) -> Peer? {
|
||||||
|
switch rhs {
|
||||||
|
case .chat, .chatEmpty, .chatForbidden, .channelForbidden:
|
||||||
|
return parseTelegramGroupOrChannel(chat: rhs)
|
||||||
|
case let .channel(flags, id, accessHash, title, username, photo, date, version, restrictionReason):
|
||||||
|
if let _ = accessHash {
|
||||||
|
return parseTelegramGroupOrChannel(chat: rhs)
|
||||||
|
} else if let lhs = lhs as? TelegramChannel {
|
||||||
|
var channelFlags = lhs.flags
|
||||||
|
if (flags & Int32(1 << 7)) != 0 {
|
||||||
|
channelFlags.insert(.verified)
|
||||||
|
} else {
|
||||||
|
let _ = channelFlags.remove(.verified)
|
||||||
|
}
|
||||||
|
var info = lhs.info
|
||||||
|
switch info {
|
||||||
|
case .broadcast:
|
||||||
|
break
|
||||||
|
case let .group(groupInfo):
|
||||||
|
var infoFlags = TelegramChannelGroupFlags()
|
||||||
|
if (flags & Int32(1 << 10)) != 0 {
|
||||||
|
infoFlags.insert(.everyMemberCanInviteMembers)
|
||||||
|
}
|
||||||
|
info = .group(TelegramChannelGroupInfo(flags: infoFlags))
|
||||||
|
}
|
||||||
|
return TelegramChannel(id: lhs.id, accessHash: lhs.accessHash, title: title, username: username, photo: imageRepresentationsForApiChatPhoto(photo), creationDate: lhs.creationDate, version: lhs.version, participationStatus: lhs.participationStatus, role: lhs.role, info: info, flags: channelFlags, restrictionInfo: lhs.restrictionInfo)
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,15 +1,19 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
func apiInputPeer(_ peer: Peer) -> Api.InputPeer? {
|
func apiInputPeer(_ peer: Peer) -> Api.InputPeer? {
|
||||||
switch peer {
|
switch peer {
|
||||||
case let user as TelegramUser where user.accessHash != nil:
|
case let user as TelegramUser where user.accessHash != nil:
|
||||||
return Api.InputPeer.inputPeerUser(userId: user.id.id, accessHash: user.accessHash!)
|
return Api.InputPeer.inputPeerUser(userId: user.id.id, accessHash: user.accessHash!)
|
||||||
case let group as TelegramGroup:
|
case let group as TelegramGroup:
|
||||||
if group.id.namespace == Namespaces.Peer.CloudGroup {
|
return Api.InputPeer.inputPeerChat(chatId: group.id.id)
|
||||||
return Api.InputPeer.inputPeerChat(chatId: group.id.id)
|
case let channel as TelegramChannel:
|
||||||
} else if group.id.namespace == Namespaces.Peer.CloudChannel {
|
if let accessHash = channel.accessHash {
|
||||||
return Api.InputPeer.inputPeerChannel(channelId: group.id.id, accessHash: group.accessHash)
|
return Api.InputPeer.inputPeerChannel(channelId: channel.id.id, accessHash: accessHash)
|
||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -19,8 +23,8 @@ func apiInputPeer(_ peer: Peer) -> Api.InputPeer? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func apiInputChannel(_ peer: Peer) -> Api.InputChannel? {
|
func apiInputChannel(_ peer: Peer) -> Api.InputChannel? {
|
||||||
if let channel = peer as? TelegramGroup, channel.accessHash != 0 {
|
if let channel = peer as? TelegramChannel, let accessHash = channel.accessHash {
|
||||||
return Api.InputChannel.inputChannel(channelId: channel.id.id, accessHash: channel.accessHash)
|
return Api.InputChannel.inputChannel(channelId: channel.id.id, accessHash: accessHash)
|
||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
final class ChannelState: PeerChatState, Equatable, CustomStringConvertible {
|
final class ChannelState: PeerChatState, Equatable, CustomStringConvertible {
|
||||||
let pts: Int32
|
let pts: Int32
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public class CloudFileMediaResource: MediaResource {
|
public class CloudFileMediaResource: MediaResource {
|
||||||
public var id: String {
|
public var id: String {
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
import TelegramCorePrivateModule
|
import TelegramCorePrivateModule
|
||||||
|
|
||||||
private func md5(_ data : Data) -> Data {
|
private func md5(_ data : Data) -> Data {
|
||||||
|
|||||||
@ -1,6 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import MtProtoKit
|
import PostboxMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
class Download {
|
class Download {
|
||||||
let datacenterId: Int
|
let datacenterId: Int
|
||||||
|
|||||||
@ -1,7 +1,14 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import MtProtoKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
public func multipartDownloadFromCloudLocation(account: Account, location: TelegramCloudMediaLocation, size: Int?, data: Data? = nil, offset: Int = 0) -> Signal<Data, NoError> {
|
public func multipartDownloadFromCloudLocation(account: Account, location: TelegramCloudMediaLocation, size: Int?, data: Data? = nil, offset: Int = 0) -> Signal<Data, NoError> {
|
||||||
return account.network.download(datacenterId: location.datacenterId)
|
return account.network.download(datacenterId: location.datacenterId)
|
||||||
|
|||||||
@ -1,9 +1,19 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
public func enqueueMessage(account: Account, peerId: PeerId, text: String) -> Signal<Void, NoError> {
|
public func enqueueMessage(account: Account, peerId: PeerId, text: String, replyMessageId: MessageId?) -> Signal<Void, NoError> {
|
||||||
return account.postbox.modify { modifier -> Void in
|
return account.postbox.modify { modifier -> Void in
|
||||||
modifier.addMessages([StoreMessage(peerId: peerId, namespace: Namespaces.Message.Local, timestamp: Int32(account.network.context.globalTime()), flags: [.Unsent], tags: [], forwardInfo: nil, authorId: account.peerId, text: text, attributes: [], media: [])], location: .Random)
|
var attributes: [MessageAttribute] = []
|
||||||
|
if let replyMessageId = replyMessageId {
|
||||||
|
attributes.append(ReplyMessageAttribute(messageId: replyMessageId))
|
||||||
|
}
|
||||||
|
|
||||||
|
modifier.addMessages([StoreMessage(peerId: peerId, namespace: Namespaces.Message.Local, timestamp: Int32(account.network.context.globalTime()), flags: [.Unsent], tags: [], forwardInfo: nil, authorId: account.peerId, text: text, attributes: attributes, media: [])], location: .Random)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,12 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private func fetchCloudMediaLocation(account: Account, cloudLocation: TelegramCloudMediaLocation, size: Int, range: Range<Int>) -> Signal<Data, NoError> {
|
private func fetchCloudMediaLocation(account: Account, cloudLocation: TelegramCloudMediaLocation, size: Int, range: Range<Int>) -> Signal<Data, NoError> {
|
||||||
if size <= 0 {
|
if size <= 0 {
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
import MtProtoKit
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
private func messageFilterForTagMask(_ tagMask: MessageTags) -> Api.MessagesFilter? {
|
private func messageFilterForTagMask(_ tagMask: MessageTags) -> Api.MessagesFilter? {
|
||||||
if tagMask == .PhotoOrVideo {
|
if tagMask == .PhotoOrVideo {
|
||||||
@ -84,8 +90,9 @@ func fetchMessageHistoryHole(network: Network, postbox: Postbox, hole: MessageHi
|
|||||||
|
|
||||||
var peers: [Peer] = []
|
var peers: [Peer] = []
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
let telegramGroup = TelegramGroup(chat: chat)
|
if let groupOrChannel = parseTelegramGroupOrChannel(chat: chat) {
|
||||||
peers.append(telegramGroup)
|
peers.append(groupOrChannel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for user in users {
|
for user in users {
|
||||||
let telegramUser = TelegramUser(user: user)
|
let telegramUser = TelegramUser(user: user)
|
||||||
@ -236,8 +243,9 @@ func fetchChatListHole(network: Network, postbox: Postbox, hole: ChatListHole) -
|
|||||||
|
|
||||||
var peers: [Peer] = []
|
var peers: [Peer] = []
|
||||||
for chat in dialogsChats {
|
for chat in dialogsChats {
|
||||||
let telegramGroup = TelegramGroup(chat: chat)
|
if let groupOrChannel = parseTelegramGroupOrChannel(chat: chat) {
|
||||||
peers.append(telegramGroup)
|
peers.append(groupOrChannel)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for user in dialogsUsers {
|
for user in dialogsUsers {
|
||||||
let telegramUser = TelegramUser(user: user)
|
let telegramUser = TelegramUser(user: user)
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public class InlineBotMessageAttribute: MessageAttribute {
|
public class InlineBotMessageAttribute: MessageAttribute {
|
||||||
public let peerId: PeerId
|
public let peerId: PeerId
|
||||||
|
|||||||
@ -34,9 +34,9 @@ public func trace(_ domain: String, what: @autoclosure() -> String) {
|
|||||||
queue.async {
|
queue.async {
|
||||||
let result = String(format: "[%@] %d-%d-%d %02d:%02d:%03d %@", arguments: [domain, Int(timeinfo.tm_year) + 1900, Int(timeinfo.tm_mon + 1), Int(timeinfo.tm_yday), Int(timeinfo.tm_hour), Int(timeinfo.tm_min), Int(milliseconds), string])
|
let result = String(format: "[%@] %d-%d-%d %02d:%02d:%03d %@", arguments: [domain, Int(timeinfo.tm_year) + 1900, Int(timeinfo.tm_mon + 1), Int(timeinfo.tm_yday), Int(timeinfo.tm_hour), Int(timeinfo.tm_min), Int(milliseconds), string])
|
||||||
|
|
||||||
#if (arch(i386) || arch(x86_64))
|
//#if (arch(i386) || arch(x86_64))
|
||||||
print(result)
|
print(result)
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private final class ManagedChatListHolesState {
|
private final class ManagedChatListHolesState {
|
||||||
private var holeDisposables: [ChatListHole: Disposable] = [:]
|
private var holeDisposables: [ChatListHole: Disposable] = [:]
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private final class ManagedMessageHistoryHolesState {
|
private final class ManagedMessageHistoryHolesState {
|
||||||
private var holeDisposables: [MessageHistoryHolesViewEntry: Disposable] = [:]
|
private var holeDisposables: [MessageHistoryHolesViewEntry: Disposable] = [:]
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
func managedServiceViews(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal<Void, NoError> {
|
func managedServiceViews(network: Network, postbox: Postbox, stateManager: StateManager) -> Signal<Void, NoError> {
|
||||||
return Signal { _ in
|
return Signal { _ in
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private final class ManagedSynchronizePeerReadStatesState {
|
private final class ManagedSynchronizePeerReadStatesState {
|
||||||
private var synchronizeDisposables: [PeerId: (PeerReadStateSynchronizationOperation, Disposable)] = [:]
|
private var synchronizeDisposables: [PeerId: (PeerReadStateSynchronizationOperation, Disposable)] = [:]
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private final class ManagedUnsentMessageIndicesState {
|
private final class ManagedUnsentMessageIndicesState {
|
||||||
private var sendDisposables: [MessageIndex: Disposable] = [:]
|
private var sendDisposables: [MessageIndex: Disposable] = [:]
|
||||||
|
|||||||
@ -1,6 +1,17 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
private typealias SignalKitTimer = SwiftSignalKitMac.Timer
|
||||||
|
#else
|
||||||
|
private typealias SignalKitTimer = SwiftSignalKit.Timer
|
||||||
|
#endif
|
||||||
|
|
||||||
private final class MultipartFetchManager {
|
private final class MultipartFetchManager {
|
||||||
let parallelParts = 4
|
let parallelParts = 4
|
||||||
@ -18,7 +29,7 @@ private final class MultipartFetchManager {
|
|||||||
var fetchingParts: [Int: (Int, Disposable)] = [:]
|
var fetchingParts: [Int: (Int, Disposable)] = [:]
|
||||||
var fetchedParts: [Int: Data] = [:]
|
var fetchedParts: [Int: Data] = [:]
|
||||||
|
|
||||||
var statsTimer: SwiftSignalKit.Timer?
|
var statsTimer: SignalKitTimer?
|
||||||
var receivedSize = 0
|
var receivedSize = 0
|
||||||
var lastStatReport: (timestamp: Double, receivedSize: Int)?
|
var lastStatReport: (timestamp: Double, receivedSize: Int)?
|
||||||
|
|
||||||
@ -30,7 +41,7 @@ private final class MultipartFetchManager {
|
|||||||
self.partReady = partReady
|
self.partReady = partReady
|
||||||
self.completed = completed
|
self.completed = completed
|
||||||
|
|
||||||
self.statsTimer = SwiftSignalKit.Timer(timeout: 3.0, repeat: true, completion: { [weak self] in
|
self.statsTimer = SignalKitTimer(timeout: 3.0, repeat: true, completion: { [weak self] in
|
||||||
self?.reportStats()
|
self?.reportStats()
|
||||||
}, queue: self.queue)
|
}, queue: self.queue)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public struct Namespaces {
|
public struct Namespaces {
|
||||||
public struct Message {
|
public struct Message {
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import MtProtoKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
import SwiftSignalKit
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
import TelegramCorePrivateModule
|
import TelegramCorePrivateModule
|
||||||
|
|
||||||
public enum ConnectionStatus {
|
public enum ConnectionStatus {
|
||||||
@ -76,66 +82,85 @@ private class MTProtoConnectionStatusDelegate: NSObject, MTProtoDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var registeredLoggingFunctions: Void = {
|
||||||
|
NetworkRegisterLoggingFunction()
|
||||||
|
registerLoggingFunctions()
|
||||||
|
}()
|
||||||
|
|
||||||
|
func initializedNetwork(datacenterId: Int, keychain: Keychain) -> Signal<Network, NoError> {
|
||||||
|
return Signal { subscriber in
|
||||||
|
Queue.concurrentDefaultQueue().async {
|
||||||
|
let _ = registeredLoggingFunctions
|
||||||
|
|
||||||
|
let serialization = Serialization()
|
||||||
|
|
||||||
|
let apiEnvironment = MTApiEnvironment()
|
||||||
|
|
||||||
|
apiEnvironment.apiId = 1
|
||||||
|
apiEnvironment.layer = NSNumber(value: Int(serialization.currentLayer()))
|
||||||
|
|
||||||
|
let context = MTContext(serialization: serialization, apiEnvironment: apiEnvironment)!
|
||||||
|
|
||||||
|
let seedAddressList = [
|
||||||
|
1: "149.154.175.50",
|
||||||
|
2: "149.154.167.50",
|
||||||
|
3: "149.154.175.100",
|
||||||
|
4: "149.154.167.91",
|
||||||
|
5: "149.154.171.5"
|
||||||
|
]
|
||||||
|
|
||||||
|
for (id, ip) in seedAddressList {
|
||||||
|
context.setSeedAddressSetForDatacenterWithId(id, seedAddressSet: MTDatacenterAddressSet(addressList: [MTDatacenterAddress(ip: ip, port: 443, preferForMedia: false, restrictToTcp: false)]))
|
||||||
|
}
|
||||||
|
|
||||||
|
context.keychain = keychain
|
||||||
|
let mtProto = MTProto(context: context, datacenterId: datacenterId)!
|
||||||
|
|
||||||
|
let connectionStatus = Promise<ConnectionStatus>(.WaitingForNetwork)
|
||||||
|
|
||||||
|
let requestService = MTRequestMessageService(context: context)!
|
||||||
|
let connectionStatusDelegate = MTProtoConnectionStatusDelegate()
|
||||||
|
connectionStatusDelegate.action = { [weak connectionStatus] flags in
|
||||||
|
if !flags.contains(.NetworkAvailable) {
|
||||||
|
connectionStatus?.set(single(ConnectionStatus.WaitingForNetwork, NoError.self))
|
||||||
|
} else if !flags.contains(.Connected) {
|
||||||
|
connectionStatus?.set(single(ConnectionStatus.Connecting, NoError.self))
|
||||||
|
} else if !flags.intersection([.UpdatingConnectionContext, .PerformingServiceTasks]).isEmpty {
|
||||||
|
connectionStatus?.set(single(ConnectionStatus.Updating, NoError.self))
|
||||||
|
} else {
|
||||||
|
connectionStatus?.set(single(ConnectionStatus.Online, NoError.self))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mtProto.delegate = connectionStatusDelegate
|
||||||
|
mtProto.add(requestService)
|
||||||
|
|
||||||
|
subscriber.putNext(Network(datacenterId: datacenterId, context: context, mtProto: mtProto, requestService: requestService, connectionStatusDelegate: connectionStatusDelegate, _connectionStatus: connectionStatus))
|
||||||
|
subscriber.putCompletion()
|
||||||
|
}
|
||||||
|
|
||||||
|
return EmptyDisposable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class Network {
|
public class Network {
|
||||||
let datacenterId: Int
|
let datacenterId: Int
|
||||||
let context: MTContext
|
let context: MTContext
|
||||||
let mtProto: MTProto
|
let mtProto: MTProto
|
||||||
let requestService: MTRequestMessageService
|
let requestService: MTRequestMessageService
|
||||||
|
private let connectionStatusDelegate: MTProtoConnectionStatusDelegate
|
||||||
|
|
||||||
private let connectionStatusDelegate = MTProtoConnectionStatusDelegate()
|
private let _connectionStatus: Promise<ConnectionStatus>
|
||||||
|
|
||||||
private let _connectionStatus = Promise<ConnectionStatus>(.WaitingForNetwork)
|
|
||||||
public var connectionStatus: Signal<ConnectionStatus, NoError> {
|
public var connectionStatus: Signal<ConnectionStatus, NoError> {
|
||||||
return self._connectionStatus.get() |> distinctUntilChanged
|
return self._connectionStatus.get() |> distinctUntilChanged
|
||||||
}
|
}
|
||||||
|
|
||||||
init(datacenterId: Int, keychain: Keychain) {
|
fileprivate init(datacenterId: Int, context: MTContext, mtProto: MTProto, requestService: MTRequestMessageService, connectionStatusDelegate: MTProtoConnectionStatusDelegate, _connectionStatus: Promise<ConnectionStatus>) {
|
||||||
NetworkRegisterLoggingFunction()
|
|
||||||
registerLoggingFunctions()
|
|
||||||
|
|
||||||
self.datacenterId = datacenterId
|
self.datacenterId = datacenterId
|
||||||
|
self.context = context
|
||||||
let serialization = Serialization()
|
self.mtProto = mtProto
|
||||||
|
self.requestService = requestService
|
||||||
let apiEnvironment = MTApiEnvironment()
|
self.connectionStatusDelegate = connectionStatusDelegate
|
||||||
|
self._connectionStatus = _connectionStatus
|
||||||
apiEnvironment.apiId = 1
|
|
||||||
apiEnvironment.layer = NSNumber(value: Int(serialization.currentLayer()))
|
|
||||||
|
|
||||||
self.context = MTContext(serialization: serialization, apiEnvironment: apiEnvironment)
|
|
||||||
|
|
||||||
let seedAddressList = [
|
|
||||||
1: "149.154.175.50",
|
|
||||||
2: "149.154.167.50",
|
|
||||||
3: "149.154.175.100",
|
|
||||||
4: "149.154.167.91",
|
|
||||||
5: "149.154.171.5"
|
|
||||||
]
|
|
||||||
|
|
||||||
for (id, ip) in seedAddressList {
|
|
||||||
self.context.setSeedAddressSetForDatacenterWithId(id, seedAddressSet: MTDatacenterAddressSet(addressList: [MTDatacenterAddress(ip: ip, port: 443, preferForMedia: false, restrictToTcp: false)]))
|
|
||||||
}
|
|
||||||
|
|
||||||
self.context.keychain = keychain
|
|
||||||
self.mtProto = MTProto(context: self.context, datacenterId: datacenterId)
|
|
||||||
|
|
||||||
self.requestService = MTRequestMessageService(context: self.context)
|
|
||||||
self.connectionStatusDelegate.action = { [weak self] flags in
|
|
||||||
if let strongSelf = self {
|
|
||||||
if !flags.contains(.NetworkAvailable) {
|
|
||||||
strongSelf._connectionStatus.set(single(ConnectionStatus.WaitingForNetwork, NoError.self))
|
|
||||||
} else if !flags.contains(.Connected) {
|
|
||||||
strongSelf._connectionStatus.set(single(ConnectionStatus.Connecting, NoError.self))
|
|
||||||
} else if !flags.intersection([.UpdatingConnectionContext, .PerformingServiceTasks]).isEmpty {
|
|
||||||
strongSelf._connectionStatus.set(single(ConnectionStatus.Updating, NoError.self))
|
|
||||||
} else {
|
|
||||||
strongSelf._connectionStatus.set(single(ConnectionStatus.Online, NoError.self))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.mtProto.delegate = self.connectionStatusDelegate
|
|
||||||
|
|
||||||
self.mtProto.add(self.requestService)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func download(datacenterId: Int) -> Signal<Download, NoError> {
|
func download(datacenterId: Int) -> Signal<Download, NoError> {
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
#ifndef Telegram_NetworkLogging_h
|
#ifndef Telegram_NetworkLogging_h
|
||||||
#define Telegram_NetworkLogging_h
|
#define Telegram_NetworkLogging_h
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <AVFoundation/AVFoundation.h>
|
|
||||||
|
|
||||||
void NetworkRegisterLoggingFunction();
|
void NetworkRegisterLoggingFunction();
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
#import "NetworkLogging.h"
|
#import "NetworkLogging.h"
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <MTProtoKit/MTLogging.h>
|
|
||||||
|
#if TARGET_OS_MAC || TARGET_OS_OSX
|
||||||
|
# import <MTProtoKitMac/MTLogging.h>
|
||||||
|
#else
|
||||||
|
# import <MTProtoKitDynamic/MTLogging.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static void (*bridgingTrace)(NSString *, NSString *);
|
static void (*bridgingTrace)(NSString *, NSString *);
|
||||||
void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) {
|
void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) {
|
||||||
@ -11,7 +16,7 @@ void setBridgingTraceFunction(void (*f)(NSString *, NSString *)) {
|
|||||||
#if TARGET_IPHONE_SIMULATOR
|
#if TARGET_IPHONE_SIMULATOR
|
||||||
static bool loggingEnabled = false;
|
static bool loggingEnabled = false;
|
||||||
#else
|
#else
|
||||||
static bool loggingEnabled = true;
|
static bool loggingEnabled = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void TGTelegramLoggingFunction(NSString *format, va_list args) {
|
static void TGTelegramLoggingFunction(NSString *format, va_list args) {
|
||||||
|
|||||||
26
TelegramCore/PeerAccessRestrictionInfo.swift
Normal file
26
TelegramCore/PeerAccessRestrictionInfo.swift
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import Foundation
|
||||||
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public final class PeerAccessRestrictionInfo: Coding, Equatable {
|
||||||
|
public let reason: String
|
||||||
|
|
||||||
|
init(reason: String) {
|
||||||
|
self.reason = reason
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(decoder: Decoder) {
|
||||||
|
self.reason = decoder.decodeStringForKey("rsn")
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(_ encoder: Encoder) {
|
||||||
|
encoder.encodeString(self.reason, forKey: "rsn")
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func ==(lhs: PeerAccessRestrictionInfo, rhs: PeerAccessRestrictionInfo) -> Bool {
|
||||||
|
return lhs.reason == rhs.reason
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,53 +1,75 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public extension Peer {
|
public extension Peer {
|
||||||
public var displayTitle: String {
|
public var displayTitle: String {
|
||||||
if let user = self as? TelegramUser {
|
switch self {
|
||||||
return user.name
|
case let user as TelegramUser:
|
||||||
} else if let group = self as? TelegramGroup {
|
return user.name
|
||||||
return group.title
|
case let group as TelegramGroup:
|
||||||
|
return group.title
|
||||||
|
case let channel as TelegramChannel:
|
||||||
|
return channel.title
|
||||||
|
default:
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public var compactDisplayTitle: String {
|
public var compactDisplayTitle: String {
|
||||||
if let user = self as? TelegramUser {
|
switch self {
|
||||||
if let firstName = user.firstName {
|
case let user as TelegramUser:
|
||||||
return firstName
|
if let firstName = user.firstName {
|
||||||
} else if let lastName = user.lastName {
|
return firstName
|
||||||
return lastName
|
} else if let lastName = user.lastName {
|
||||||
} else {
|
return lastName
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
case let group as TelegramGroup:
|
||||||
|
return group.title
|
||||||
|
case let channel as TelegramChannel:
|
||||||
|
return channel.title
|
||||||
|
default:
|
||||||
return ""
|
return ""
|
||||||
}
|
|
||||||
} else if let group = self as? TelegramGroup {
|
|
||||||
return group.title
|
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public var displayLetters: [String] {
|
public var displayLetters: [String] {
|
||||||
if let user = self as? TelegramUser {
|
switch self {
|
||||||
if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty && !lastName.isEmpty {
|
case let user as TelegramUser:
|
||||||
return [firstName.substring(to: firstName.index(after: firstName.startIndex)).uppercased(), lastName.substring(to: lastName.index(after: lastName.startIndex)).uppercased()]
|
if let firstName = user.firstName, let lastName = user.lastName, !firstName.isEmpty && !lastName.isEmpty {
|
||||||
} else if let firstName = user.firstName, !firstName.isEmpty {
|
return [firstName.substring(to: firstName.index(after: firstName.startIndex)).uppercased(), lastName.substring(to: lastName.index(after: lastName.startIndex)).uppercased()]
|
||||||
return [firstName.substring(to: firstName.index(after: firstName.startIndex)).uppercased()]
|
} else if let firstName = user.firstName, !firstName.isEmpty {
|
||||||
} else if let lastName = user.lastName, !lastName.isEmpty {
|
return [firstName.substring(to: firstName.index(after: firstName.startIndex)).uppercased()]
|
||||||
return [lastName.substring(to: lastName.index(after: lastName.startIndex)).uppercased()]
|
} else if let lastName = user.lastName, !lastName.isEmpty {
|
||||||
}
|
return [lastName.substring(to: lastName.index(after: lastName.startIndex)).uppercased()]
|
||||||
|
}
|
||||||
|
|
||||||
return []
|
return []
|
||||||
} else if let group = self as? TelegramGroup {
|
case let group as TelegramGroup:
|
||||||
if group.title.startIndex != group.title.endIndex {
|
if group.title.startIndex != group.title.endIndex {
|
||||||
return [group.title.substring(to: group.title.index(after: group.title.startIndex)).uppercased()]
|
return [group.title.substring(to: group.title.index(after: group.title.startIndex)).uppercased()]
|
||||||
}
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
case let channel as TelegramChannel:
|
||||||
|
if channel.title.startIndex != channel.title.endIndex {
|
||||||
|
return [channel.title.substring(to: channel.title.index(after: channel.title.startIndex)).uppercased()]
|
||||||
|
} else {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return []
|
||||||
}
|
}
|
||||||
return []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public extension PeerId {
|
public extension PeerId {
|
||||||
public var isGroup: Bool {
|
public var isGroupOrChannel: Bool {
|
||||||
switch self.namespace {
|
switch self.namespace {
|
||||||
case Namespaces.Peer.CloudGroup, Namespaces.Peer.CloudChannel:
|
case Namespaces.Peer.CloudGroup, Namespaces.Peer.CloudChannel:
|
||||||
return true
|
return true
|
||||||
@ -85,4 +107,3 @@ public func peerDisplayTitles(_ peers: [Peer]) -> String {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,10 @@ private let phoneNumberUtil = NBPhoneNumberUtil()
|
|||||||
|
|
||||||
public func formatPhoneNumber(_ string: String) -> String {
|
public func formatPhoneNumber(_ string: String) -> String {
|
||||||
do {
|
do {
|
||||||
let number = try phoneNumberUtil.parse("+" + string, defaultRegion: nil)
|
return string
|
||||||
return try phoneNumberUtil.format(number, numberFormat: .INTERNATIONAL)
|
//let number = try phoneNumberUtil.parse("+" + string, defaultRegion: nil)
|
||||||
|
//return try phoneNumberUtil.format(number, numberFormat: .INTERNATIONAL)
|
||||||
} catch _ {
|
} catch _ {
|
||||||
return ""
|
return string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
public func recentPeers(account: Account) -> Signal<[Peer], NoError> {
|
public func recentPeers(account: Account) -> Signal<[Peer], NoError> {
|
||||||
let cachedPeers = account.postbox.recentPeers()
|
let cachedPeers = account.postbox.recentPeers()
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public class ReplyMessageAttribute: MessageAttribute {
|
public class ReplyMessageAttribute: MessageAttribute {
|
||||||
public let messageId: MessageId
|
public let messageId: MessageId
|
||||||
|
|||||||
@ -1,6 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
private func locallyRenderedMessage(message: StoreMessage, peers: [PeerId: Peer]) -> Message? {
|
private func locallyRenderedMessage(message: StoreMessage, peers: [PeerId: Peer]) -> Message? {
|
||||||
guard case let .Id(id) = message.id else {
|
guard case let .Id(id) = message.id else {
|
||||||
@ -58,8 +65,8 @@ public func searchMessages(account: Account, query: String) -> Signal<[Message],
|
|||||||
}
|
}
|
||||||
|
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
if let group = TelegramGroup.merge(modifier.getPeer(chat.peerId) as? TelegramGroup, rhs: chat) {
|
if let groupOrChannel = parseTelegramGroupOrChannel(chat: chat) {
|
||||||
peers[group.id] = group
|
peers[groupOrChannel.id] = groupOrChannel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,3 +84,60 @@ public func searchMessages(account: Account, query: String) -> Signal<[Message],
|
|||||||
|
|
||||||
return processedSearchResult
|
return processedSearchResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func downloadMessage(account: Account, message: MessageId) -> Signal<Message?, NoError> {
|
||||||
|
let signal: Signal<Api.messages.Messages, MTRpcError>
|
||||||
|
if message.peerId.namespace == Namespaces.Peer.CloudChannel {
|
||||||
|
signal = .complete()
|
||||||
|
} else {
|
||||||
|
signal = account.network.request(Api.functions.messages.getMessages(id: [message.id]))
|
||||||
|
}
|
||||||
|
|
||||||
|
return signal
|
||||||
|
|> retryRequest
|
||||||
|
|> mapToSignal { result -> Signal<Message?, NoError> in
|
||||||
|
NSLog("TGNT download message3 \(result)")
|
||||||
|
let messages: [Api.Message]
|
||||||
|
let chats: [Api.Chat]
|
||||||
|
let users: [Api.User]
|
||||||
|
switch result {
|
||||||
|
case let .channelMessages(_, _, _, apiMessages, apiChats, apiUsers):
|
||||||
|
messages = apiMessages
|
||||||
|
chats = apiChats
|
||||||
|
users = apiUsers
|
||||||
|
case let .messages(apiMessages, apiChats, apiUsers):
|
||||||
|
messages = apiMessages
|
||||||
|
chats = apiChats
|
||||||
|
users = apiUsers
|
||||||
|
case let.messagesSlice(_, apiMessages, apiChats, apiUsers):
|
||||||
|
messages = apiMessages
|
||||||
|
chats = apiChats
|
||||||
|
users = apiUsers
|
||||||
|
}
|
||||||
|
|
||||||
|
return account.postbox.modify { modifier -> Message? in
|
||||||
|
var peers: [PeerId: Peer] = [:]
|
||||||
|
|
||||||
|
for user in users {
|
||||||
|
if let user = TelegramUser.merge(modifier.getPeer(user.peerId) as? TelegramUser, rhs: user) {
|
||||||
|
peers[user.id] = user
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for chat in chats {
|
||||||
|
if let groupOrChannel = mergeGroupOrChannel(lhs: modifier.getPeer(chat.peerId), rhs: chat) {
|
||||||
|
peers[groupOrChannel.id] = groupOrChannel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var renderedMessages: [Message] = []
|
||||||
|
for message in messages {
|
||||||
|
if let message = StoreMessage(apiMessage: message), let renderedMessage = locallyRenderedMessage(message: message, peers: peers) {
|
||||||
|
renderedMessages.append(renderedMessage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return renderedMessages.first
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftSignalKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateManager, message: Message) -> Signal<Void, NoError> {
|
func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateManager, message: Message) -> Signal<Void, NoError> {
|
||||||
return postbox.peerWithId(message.id.peerId)
|
return postbox.peerWithId(message.id.peerId)
|
||||||
@ -10,7 +15,20 @@ func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateMa
|
|||||||
if let inputPeer = apiInputPeer(peer) {
|
if let inputPeer = apiInputPeer(peer) {
|
||||||
var randomId: Int64 = 0
|
var randomId: Int64 = 0
|
||||||
arc4random_buf(&randomId, 8)
|
arc4random_buf(&randomId, 8)
|
||||||
return network.request(Api.functions.messages.sendMessage(flags: 0, peer: inputPeer, replyToMsgId: 0, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil))
|
|
||||||
|
var replyMessageId: Int32?
|
||||||
|
for attribute in message.attributes {
|
||||||
|
if let replyAttribute = attribute as? ReplyMessageAttribute {
|
||||||
|
replyMessageId = replyAttribute.messageId.id
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var flags: Int32 = 0
|
||||||
|
if let replyMessageId = replyMessageId {
|
||||||
|
flags |= Int32(1 << 0)
|
||||||
|
}
|
||||||
|
return network.request(Api.functions.messages.sendMessage(flags: flags, peer: inputPeer, replyToMsgId: replyMessageId, message: message.text, randomId: randomId, replyMarkup: nil, entities: nil))
|
||||||
|> mapError { _ -> NoError in
|
|> mapError { _ -> NoError in
|
||||||
return NoError()
|
return NoError()
|
||||||
}
|
}
|
||||||
@ -42,8 +60,14 @@ func sendUnsentMessage(network: Network, postbox: Postbox, stateManager: StateMa
|
|||||||
media = []
|
media = []
|
||||||
}
|
}
|
||||||
|
|
||||||
var updatedAttributes: [MessageAttribute] = []
|
var updatedAttributes: [MessageAttribute] = currentMessage.attributes
|
||||||
if let entities = entities, !entities.isEmpty {
|
if let entities = entities, !entities.isEmpty {
|
||||||
|
for i in 0 ..< updatedAttributes.count {
|
||||||
|
if updatedAttributes[i] is TextEntitiesMessageAttribute {
|
||||||
|
updatedAttributes.remove(at: i)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
updatedAttributes.append(TextEntitiesMessageAttribute(entities: messageTextEntitiesFromApiEntities(entities)))
|
updatedAttributes.append(TextEntitiesMessageAttribute(entities: messageTextEntitiesFromApiEntities(entities)))
|
||||||
}
|
}
|
||||||
attributes = updatedAttributes
|
attributes = updatedAttributes
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import MtProtoKit
|
#if os(macOS)
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
public class BoxedMessage: NSObject {
|
public class BoxedMessage: NSObject {
|
||||||
public let body: Any
|
public let body: Any
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
import MtProtoKit
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
private enum Event<T, E> {
|
private enum Event<T, E> {
|
||||||
case Next(T)
|
case Next(T)
|
||||||
@ -147,9 +153,9 @@ private struct MutableState {
|
|||||||
self.channelStates[peerId] = channelState
|
self.channelStates[peerId] = channelState
|
||||||
case let .MergeApiChats(chats):
|
case let .MergeApiChats(chats):
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
if let group = TelegramGroup.merge(peers[chat.peerId] as? TelegramGroup, rhs: chat) {
|
if let groupOrChannel = mergeGroupOrChannel(lhs: peers[chat.peerId], rhs: chat) {
|
||||||
peers[group.id] = group
|
peers[groupOrChannel.id] = groupOrChannel
|
||||||
insertedPeers[group.id] = group
|
insertedPeers[groupOrChannel.id] = groupOrChannel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case let .MergeApiUsers(users):
|
case let .MergeApiUsers(users):
|
||||||
@ -558,27 +564,27 @@ private func finalStateWithUpdates(account: Account, state: MutableState, update
|
|||||||
case let .updateChannelTooLong(_, channelId, _):
|
case let .updateChannelTooLong(_, channelId, _):
|
||||||
let peerId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
let peerId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
||||||
if !channelsToPoll.contains(peerId) {
|
if !channelsToPoll.contains(peerId) {
|
||||||
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramGroup)?.title ?? "nil")) updateChannelTooLong")
|
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramChannel)?.title ?? "nil")) updateChannelTooLong")
|
||||||
channelsToPoll.insert(peerId)
|
channelsToPoll.insert(peerId)
|
||||||
}
|
}
|
||||||
case let .updateDeleteChannelMessages(channelId, messages, pts: pts, ptsCount):
|
case let .updateDeleteChannelMessages(channelId, messages, pts: pts, ptsCount):
|
||||||
let peerId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
let peerId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
||||||
if let previousState = updatedState.channelStates[peerId] {
|
if let previousState = updatedState.channelStates[peerId] {
|
||||||
if previousState.pts >= pts {
|
if previousState.pts >= pts {
|
||||||
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramGroup)?.title ?? "nil")) skip old delete update")
|
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramChannel)?.title ?? "nil")) skip old delete update")
|
||||||
} else if previousState.pts + ptsCount == pts {
|
} else if previousState.pts + ptsCount == pts {
|
||||||
updatedState.deleteMessages(messages.map({ MessageId(peerId: peerId, namespace: Namespaces.Message.Cloud, id: $0) }))
|
updatedState.deleteMessages(messages.map({ MessageId(peerId: peerId, namespace: Namespaces.Message.Cloud, id: $0) }))
|
||||||
updatedState.updateChannelState(peerId, state: previousState.setPts(pts))
|
updatedState.updateChannelState(peerId, state: previousState.setPts(pts))
|
||||||
} else {
|
} else {
|
||||||
if !channelsToPoll.contains(peerId) {
|
if !channelsToPoll.contains(peerId) {
|
||||||
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramGroup)?.title ?? "nil")) delete pts hole")
|
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramChannel)?.title ?? "nil")) delete pts hole")
|
||||||
channelsToPoll.insert(peerId)
|
channelsToPoll.insert(peerId)
|
||||||
//updatedMissingUpdates = true
|
//updatedMissingUpdates = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if !channelsToPoll.contains(peerId) {
|
if !channelsToPoll.contains(peerId) {
|
||||||
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramGroup)?.title ?? "nil")) state unknown")
|
trace("State", what: "channel \(peerId) (\((updatedState.peers[peerId] as? TelegramChannel)?.title ?? "nil")) state unknown")
|
||||||
channelsToPoll.insert(peerId)
|
channelsToPoll.insert(peerId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -588,13 +594,13 @@ private func finalStateWithUpdates(account: Account, state: MutableState, update
|
|||||||
if let message = StoreMessage(apiMessage: message) {
|
if let message = StoreMessage(apiMessage: message) {
|
||||||
if let previousState = updatedState.channelStates[message.id.peerId] {
|
if let previousState = updatedState.channelStates[message.id.peerId] {
|
||||||
if previousState.pts >= pts {
|
if previousState.pts >= pts {
|
||||||
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramGroup)?.title ?? "nil")) skip old message \(message.id) (\(message.text))")
|
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramChannel)?.title ?? "nil")) skip old message \(message.id) (\(message.text))")
|
||||||
} else if previousState.pts + ptsCount == pts {
|
} else if previousState.pts + ptsCount == pts {
|
||||||
updatedState.addMessages([message], location: .UpperHistoryBlock)
|
updatedState.addMessages([message], location: .UpperHistoryBlock)
|
||||||
updatedState.updateChannelState(message.id.peerId, state: previousState.setPts(pts))
|
updatedState.updateChannelState(message.id.peerId, state: previousState.setPts(pts))
|
||||||
} else {
|
} else {
|
||||||
if !channelsToPoll.contains(message.id.peerId) {
|
if !channelsToPoll.contains(message.id.peerId) {
|
||||||
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramGroup)?.title ?? "nil")) message pts hole")
|
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramChannel)?.title ?? "nil")) message pts hole")
|
||||||
;
|
;
|
||||||
channelsToPoll.insert(message.id.peerId)
|
channelsToPoll.insert(message.id.peerId)
|
||||||
//updatedMissingUpdates = true
|
//updatedMissingUpdates = true
|
||||||
@ -602,7 +608,7 @@ private func finalStateWithUpdates(account: Account, state: MutableState, update
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if !channelsToPoll.contains(message.id.peerId) {
|
if !channelsToPoll.contains(message.id.peerId) {
|
||||||
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramGroup)?.title ?? "nil")) state unknown")
|
trace("State", what: "channel \(message.id.peerId) (\((updatedState.peers[message.id.peerId] as? TelegramChannel)?.title ?? "nil")) state unknown")
|
||||||
channelsToPoll.insert(message.id.peerId)
|
channelsToPoll.insert(message.id.peerId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -975,8 +981,8 @@ private func replayFinalState(_ modifier: Modifier, finalState: MutableState) ->
|
|||||||
case let .MergeApiChats(chats):
|
case let .MergeApiChats(chats):
|
||||||
var peers: [Peer] = []
|
var peers: [Peer] = []
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
if let telegramGroup = TelegramGroup.merge(modifier.getPeer(chat.peerId) as? TelegramGroup, rhs: chat) {
|
if let groupOrChannel = mergeGroupOrChannel(lhs: modifier.getPeer(chat.peerId), rhs: chat) {
|
||||||
peers.append(telegramGroup)
|
peers.append(groupOrChannel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
modifier.updatePeers(peers, update: { _, updated in
|
modifier.updatePeers(peers, update: { _, updated in
|
||||||
@ -1055,6 +1061,12 @@ private func pollDifference(_ account: Account) -> Signal<Void, NoError> {
|
|||||||
return signal
|
return signal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
private typealias SignalKitTimer = SwiftSignalKitMac.Timer
|
||||||
|
#else
|
||||||
|
private typealias SignalKitTimer = SwiftSignalKit.Timer
|
||||||
|
#endif
|
||||||
|
|
||||||
public class StateManager {
|
public class StateManager {
|
||||||
private let stateQueue = Queue()
|
private let stateQueue = Queue()
|
||||||
|
|
||||||
@ -1064,7 +1076,7 @@ public class StateManager {
|
|||||||
private let disposable = MetaDisposable()
|
private let disposable = MetaDisposable()
|
||||||
private let updatesDisposable = MetaDisposable()
|
private let updatesDisposable = MetaDisposable()
|
||||||
private let actions = ValuePipe<Signal<Void, NoError>>()
|
private let actions = ValuePipe<Signal<Void, NoError>>()
|
||||||
private var timer: SwiftSignalKit.Timer?
|
private var timer: SignalKitTimer?
|
||||||
|
|
||||||
private var collectingUpdateGroups = false
|
private var collectingUpdateGroups = false
|
||||||
private var collectedUpdateGroups: [UpdateGroup] = []
|
private var collectedUpdateGroups: [UpdateGroup] = []
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
func tagsForStoreMessage(_ medias: [Media]) -> MessageTags {
|
func tagsForStoreMessage(_ medias: [Media]) -> MessageTags {
|
||||||
var tags = MessageTags()
|
var tags = MessageTags()
|
||||||
@ -299,12 +303,14 @@ extension StoreMessage {
|
|||||||
sourceId = peerId
|
sourceId = peerId
|
||||||
|
|
||||||
if let channelPost = channelPost {
|
if let channelPost = channelPost {
|
||||||
sourceMessageId = MessageId(peerId: peerId, namespace: Namespaces.Peer.CloudChannel, id: channelPost)
|
sourceMessageId = MessageId(peerId: peerId, namespace: Namespaces.Message.Cloud, id: channelPost)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let authorId = authorId {
|
if let authorId = authorId {
|
||||||
forwardInfo = StoreMessageForwardInfo(authorId: authorId, sourceId: sourceId, sourceMessageId: sourceMessageId, date: date)
|
forwardInfo = StoreMessageForwardInfo(authorId: authorId, sourceId: sourceId, sourceMessageId: sourceMessageId, date: date)
|
||||||
|
} else if let sourceId = sourceId {
|
||||||
|
forwardInfo = StoreMessageForwardInfo(authorId: sourceId, sourceId: nil, sourceMessageId: sourceMessageId, date: date)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
import SwiftSignalKit
|
import PostboxMac
|
||||||
|
import SwiftSignalKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
#endif
|
||||||
|
|
||||||
private enum VerifyReadStateError {
|
private enum VerifyReadStateError {
|
||||||
case Abort
|
case Abort
|
||||||
|
|||||||
269
TelegramCore/TelegramChannel.swift
Normal file
269
TelegramCore/TelegramChannel.swift
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
import Foundation
|
||||||
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public enum TelegramChannelParticipationStatus {
|
||||||
|
case member
|
||||||
|
case left
|
||||||
|
case kicked
|
||||||
|
|
||||||
|
fileprivate var rawValue: Int32 {
|
||||||
|
switch self {
|
||||||
|
case .member:
|
||||||
|
return 0
|
||||||
|
case .left:
|
||||||
|
return 1
|
||||||
|
case .kicked:
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate init(rawValue: Int32) {
|
||||||
|
switch rawValue {
|
||||||
|
case 0:
|
||||||
|
self = .member
|
||||||
|
case 1:
|
||||||
|
self = .left
|
||||||
|
case 2:
|
||||||
|
self = .kicked
|
||||||
|
default:
|
||||||
|
self = .left
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TelegramChannelRole {
|
||||||
|
case member
|
||||||
|
case creator
|
||||||
|
case editor
|
||||||
|
case moderator
|
||||||
|
|
||||||
|
fileprivate var rawValue: Int32 {
|
||||||
|
switch self {
|
||||||
|
case .member:
|
||||||
|
return 0
|
||||||
|
case .creator:
|
||||||
|
return 1
|
||||||
|
case .editor:
|
||||||
|
return 2
|
||||||
|
case .moderator:
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate init(rawValue: Int32) {
|
||||||
|
switch rawValue {
|
||||||
|
case 0:
|
||||||
|
self = .member
|
||||||
|
case 1:
|
||||||
|
self = .creator
|
||||||
|
case 2:
|
||||||
|
self = .editor
|
||||||
|
case 3:
|
||||||
|
self = .moderator
|
||||||
|
default:
|
||||||
|
self = .member
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TelegramChannelBroadcastFlags: OptionSet {
|
||||||
|
public var rawValue: Int32
|
||||||
|
|
||||||
|
public init() {
|
||||||
|
self.rawValue = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(rawValue: Int32) {
|
||||||
|
self.rawValue = rawValue
|
||||||
|
}
|
||||||
|
|
||||||
|
public static let messagesShouldHaveSignatures = TelegramChannelBroadcastFlags(rawValue: 1 << 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TelegramChannelBroadcastInfo: Equatable {
|
||||||
|
public let flags: TelegramChannelBroadcastFlags
|
||||||
|
|
||||||
|
public static func ==(lhs: TelegramChannelBroadcastInfo, rhs: TelegramChannelBroadcastInfo) -> Bool {
|
||||||
|
return lhs.flags == rhs.flags
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TelegramChannelGroupFlags: OptionSet {
|
||||||
|
public var rawValue: Int32
|
||||||
|
|
||||||
|
public init() {
|
||||||
|
self.rawValue = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(rawValue: Int32) {
|
||||||
|
self.rawValue = rawValue
|
||||||
|
}
|
||||||
|
|
||||||
|
public static let everyMemberCanInviteMembers = TelegramChannelGroupFlags(rawValue: 1 << 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TelegramChannelGroupInfo: Equatable {
|
||||||
|
public let flags: TelegramChannelGroupFlags
|
||||||
|
|
||||||
|
public static func ==(lhs: TelegramChannelGroupInfo, rhs: TelegramChannelGroupInfo) -> Bool {
|
||||||
|
return lhs.flags == rhs.flags
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TelegramChannelInfo: Equatable {
|
||||||
|
case broadcast(TelegramChannelBroadcastInfo)
|
||||||
|
case group(TelegramChannelGroupInfo)
|
||||||
|
|
||||||
|
public static func ==(lhs: TelegramChannelInfo, rhs: TelegramChannelInfo) -> Bool {
|
||||||
|
switch lhs {
|
||||||
|
case let .broadcast(lhsInfo):
|
||||||
|
switch rhs {
|
||||||
|
case .broadcast(lhsInfo):
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
case let .group(lhsInfo):
|
||||||
|
switch rhs {
|
||||||
|
case .group(lhsInfo):
|
||||||
|
return true
|
||||||
|
default:
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate func encode(encoder: Encoder) {
|
||||||
|
switch self {
|
||||||
|
case let .broadcast(info):
|
||||||
|
encoder.encodeInt32(0, forKey: "i.t")
|
||||||
|
encoder.encodeInt32(info.flags.rawValue, forKey: "i.f")
|
||||||
|
case let .group(info):
|
||||||
|
encoder.encodeInt32(1, forKey: "i.t")
|
||||||
|
encoder.encodeInt32(info.flags.rawValue, forKey: "i.f")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fileprivate static func decode(decoder: Decoder) -> TelegramChannelInfo {
|
||||||
|
let type: Int32 = decoder.decodeInt32ForKey("i.t")
|
||||||
|
if type == 0 {
|
||||||
|
return .broadcast(TelegramChannelBroadcastInfo(flags: TelegramChannelBroadcastFlags(rawValue: decoder.decodeInt32ForKey("i.f"))))
|
||||||
|
} else {
|
||||||
|
return .group(TelegramChannelGroupInfo(flags: TelegramChannelGroupFlags(rawValue: decoder.decodeInt32ForKey("i.f"))))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct TelegramChannelFlags: OptionSet {
|
||||||
|
public var rawValue: Int32
|
||||||
|
|
||||||
|
public init() {
|
||||||
|
self.rawValue = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(rawValue: Int32) {
|
||||||
|
self.rawValue = rawValue
|
||||||
|
}
|
||||||
|
|
||||||
|
public static let verified = TelegramChannelFlags(rawValue: 1 << 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class TelegramChannel: Peer {
|
||||||
|
public let id: PeerId
|
||||||
|
public let accessHash: Int64?
|
||||||
|
public let title: String
|
||||||
|
public let username: String?
|
||||||
|
public let photo: [TelegramMediaImageRepresentation]
|
||||||
|
public let creationDate: Int32
|
||||||
|
public let version: Int32
|
||||||
|
public let participationStatus: TelegramChannelParticipationStatus
|
||||||
|
public let role: TelegramChannelRole
|
||||||
|
public let info: TelegramChannelInfo
|
||||||
|
public let flags: TelegramChannelFlags
|
||||||
|
public let restrictionInfo: PeerAccessRestrictionInfo?
|
||||||
|
|
||||||
|
public var indexName: PeerIndexNameRepresentation {
|
||||||
|
return .title(self.title)
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(id: PeerId, accessHash: Int64?, title: String, username: String?, photo: [TelegramMediaImageRepresentation], creationDate: Int32, version: Int32, participationStatus: TelegramChannelParticipationStatus, role: TelegramChannelRole, info: TelegramChannelInfo, flags: TelegramChannelFlags, restrictionInfo: PeerAccessRestrictionInfo?) {
|
||||||
|
self.id = id
|
||||||
|
self.accessHash = accessHash
|
||||||
|
self.title = title
|
||||||
|
self.username = username
|
||||||
|
self.photo = photo
|
||||||
|
self.creationDate = creationDate
|
||||||
|
self.version = version
|
||||||
|
self.participationStatus = participationStatus
|
||||||
|
self.role = role
|
||||||
|
self.info = info
|
||||||
|
self.flags = flags
|
||||||
|
self.restrictionInfo = restrictionInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(decoder: Decoder) {
|
||||||
|
self.id = PeerId(decoder.decodeInt64ForKey("i"))
|
||||||
|
self.accessHash = decoder.decodeInt64ForKey("ah")
|
||||||
|
self.title = decoder.decodeStringForKey("t")
|
||||||
|
self.username = decoder.decodeStringForKey("un")
|
||||||
|
self.photo = decoder.decodeObjectArrayForKey("ph")
|
||||||
|
self.creationDate = decoder.decodeInt32ForKey("d")
|
||||||
|
self.version = decoder.decodeInt32ForKey("v")
|
||||||
|
self.participationStatus = TelegramChannelParticipationStatus(rawValue: decoder.decodeInt32ForKey("ps"))
|
||||||
|
self.role = TelegramChannelRole(rawValue: decoder.decodeInt32ForKey("ro"))
|
||||||
|
self.info = TelegramChannelInfo.decode(decoder: decoder)
|
||||||
|
self.flags = TelegramChannelFlags(rawValue: decoder.decodeInt32ForKey("fl"))
|
||||||
|
self.restrictionInfo = decoder.decodeObjectForKey("ri") as? PeerAccessRestrictionInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(_ encoder: Encoder) {
|
||||||
|
encoder.encodeInt64(self.id.toInt64(), forKey: "i")
|
||||||
|
if let accessHash = self.accessHash {
|
||||||
|
encoder.encodeInt64(accessHash, forKey: "ah")
|
||||||
|
} else {
|
||||||
|
encoder.encodeNil(forKey: "ah")
|
||||||
|
}
|
||||||
|
encoder.encodeString(self.title, forKey: "t")
|
||||||
|
if let username = self.username {
|
||||||
|
encoder.encodeString(username, forKey: "un")
|
||||||
|
} else {
|
||||||
|
encoder.encodeNil(forKey: "un")
|
||||||
|
}
|
||||||
|
encoder.encodeObjectArray(self.photo, forKey: "ph")
|
||||||
|
encoder.encodeInt32(self.creationDate, forKey: "d")
|
||||||
|
encoder.encodeInt32(self.version, forKey: "v")
|
||||||
|
encoder.encodeInt32(self.participationStatus.rawValue, forKey: "ps")
|
||||||
|
encoder.encodeInt32(self.role.rawValue, forKey: "ro")
|
||||||
|
self.info.encode(encoder: encoder)
|
||||||
|
encoder.encodeInt32(self.flags.rawValue, forKey: "fl")
|
||||||
|
if let restrictionInfo = self.restrictionInfo {
|
||||||
|
encoder.encodeObject(restrictionInfo, forKey: "ri")
|
||||||
|
} else {
|
||||||
|
encoder.encodeNil(forKey: "ri")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func isEqual(_ other: Peer) -> Bool {
|
||||||
|
guard let other = other as? TelegramChannel else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.id != other.id || self.accessHash != other.accessHash || self.title != other.title || self.username != other.username || self.photo != other.photo {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.creationDate != other.creationDate || self.version != other.version || self.participationStatus != other.participationStatus {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.role != other.role || self.info != other.info || self.flags != other.flags || self.restrictionInfo != other.restrictionInfo {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public enum TelegramGroupMembership: Int32 {
|
public enum TelegramGroupMembership: Int32 {
|
||||||
case Member
|
case Member
|
||||||
@ -7,9 +11,8 @@ public enum TelegramGroupMembership: Int32 {
|
|||||||
case Removed
|
case Removed
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class TelegramGroup: Peer, Coding {
|
public final class TelegramGroup: Peer {
|
||||||
public let id: PeerId
|
public let id: PeerId
|
||||||
public let accessHash: Int64
|
|
||||||
public let title: String
|
public let title: String
|
||||||
public let photo: [TelegramMediaImageRepresentation]
|
public let photo: [TelegramMediaImageRepresentation]
|
||||||
public let participantCount: Int
|
public let participantCount: Int
|
||||||
@ -20,9 +23,8 @@ public final class TelegramGroup: Peer, Coding {
|
|||||||
return .title(self.title)
|
return .title(self.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(id: PeerId, accessHash: Int64?, title: String, photo: [TelegramMediaImageRepresentation], participantCount: Int, membership: TelegramGroupMembership, version: Int) {
|
public init(id: PeerId, title: String, photo: [TelegramMediaImageRepresentation], participantCount: Int, membership: TelegramGroupMembership, version: Int) {
|
||||||
self.id = id
|
self.id = id
|
||||||
self.accessHash = accessHash ?? 0
|
|
||||||
self.title = title
|
self.title = title
|
||||||
self.photo = photo
|
self.photo = photo
|
||||||
self.participantCount = participantCount
|
self.participantCount = participantCount
|
||||||
@ -32,7 +34,6 @@ public final class TelegramGroup: Peer, Coding {
|
|||||||
|
|
||||||
public init(decoder: Decoder) {
|
public init(decoder: Decoder) {
|
||||||
self.id = PeerId(decoder.decodeInt64ForKey("i"))
|
self.id = PeerId(decoder.decodeInt64ForKey("i"))
|
||||||
self.accessHash = decoder.decodeInt64ForKey("ah")
|
|
||||||
self.title = decoder.decodeStringForKey("t")
|
self.title = decoder.decodeStringForKey("t")
|
||||||
self.photo = decoder.decodeObjectArrayForKey("ph")
|
self.photo = decoder.decodeObjectArrayForKey("ph")
|
||||||
self.participantCount = Int(decoder.decodeInt32ForKey("pc"))
|
self.participantCount = Int(decoder.decodeInt32ForKey("pc"))
|
||||||
@ -42,7 +43,6 @@ public final class TelegramGroup: Peer, Coding {
|
|||||||
|
|
||||||
public func encode(_ encoder: Encoder) {
|
public func encode(_ encoder: Encoder) {
|
||||||
encoder.encodeInt64(self.id.toInt64(), forKey: "i")
|
encoder.encodeInt64(self.id.toInt64(), forKey: "i")
|
||||||
encoder.encodeInt64(accessHash, forKey: "ah")
|
|
||||||
encoder.encodeString(self.title, forKey: "t")
|
encoder.encodeString(self.title, forKey: "t")
|
||||||
encoder.encodeObjectArray(self.photo, forKey: "ph")
|
encoder.encodeObjectArray(self.photo, forKey: "ph")
|
||||||
encoder.encodeInt32(Int32(self.participantCount), forKey: "pc")
|
encoder.encodeInt32(Int32(self.participantCount), forKey: "pc")
|
||||||
@ -55,9 +55,6 @@ public final class TelegramGroup: Peer, Coding {
|
|||||||
if self.id != other.id {
|
if self.id != other.id {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if self.accessHash != other.accessHash {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if self.title != other.title {
|
if self.title != other.title {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -79,51 +76,3 @@ public final class TelegramGroup: Peer, Coding {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func imageRepresentationsForApiChatPhoto(_ photo: Api.ChatPhoto) -> [TelegramMediaImageRepresentation] {
|
|
||||||
var telegramPhoto: [TelegramMediaImageRepresentation] = []
|
|
||||||
switch photo {
|
|
||||||
case let .chatPhoto(photoSmall, photoBig):
|
|
||||||
if let smallLocation = telegramMediaLocationFromApiLocation(photoSmall), let largeLocation = telegramMediaLocationFromApiLocation(photoBig) {
|
|
||||||
telegramPhoto.append(TelegramMediaImageRepresentation(dimensions: CGSize(width: 80.0, height: 80.0), location: smallLocation, size: nil))
|
|
||||||
telegramPhoto.append(TelegramMediaImageRepresentation(dimensions: CGSize(width: 640.0, height: 640.0), location: largeLocation, size: nil))
|
|
||||||
}
|
|
||||||
case .chatPhotoEmpty:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
return telegramPhoto
|
|
||||||
}
|
|
||||||
|
|
||||||
public extension TelegramGroup {
|
|
||||||
public convenience init(chat: Api.Chat) {
|
|
||||||
switch chat {
|
|
||||||
case let .chat(flags, id, title, photo, participantsCount, _, version, _):
|
|
||||||
let left = (flags & (1 | 2)) != 0
|
|
||||||
self.init(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), accessHash: nil, title: title, photo: imageRepresentationsForApiChatPhoto(photo), participantCount: Int(participantsCount), membership: left ? .Left : .Member, version: Int(version))
|
|
||||||
case let .chatEmpty(id):
|
|
||||||
self.init(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), accessHash: nil, title: "", photo: [], participantCount: 0, membership: .Removed, version: 0)
|
|
||||||
case let .chatForbidden(id, title):
|
|
||||||
self.init(id: PeerId(namespace: Namespaces.Peer.CloudGroup, id: id), accessHash: nil, title: title, photo: [], participantCount: 0, membership: .Removed, version: 0)
|
|
||||||
case let .channel(flags, id, accessHash, title, _, photo, date, version, restrictionReason):
|
|
||||||
let left = (flags & (1 | 2)) != 0
|
|
||||||
self.init(id: PeerId(namespace: Namespaces.Peer.CloudChannel, id: id), accessHash: accessHash, title: title, photo: imageRepresentationsForApiChatPhoto(photo), participantCount: 0, membership: left ? .Left : .Member, version: Int(version))
|
|
||||||
case let .channelForbidden(_, id, accessHash, title):
|
|
||||||
self.init(id: PeerId(namespace: Namespaces.Peer.CloudChannel, id: id), accessHash: accessHash, title: title, photo: [], participantCount: 0, membership: .Left, version: 0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func merge(_ lhs: TelegramGroup?, rhs: Api.Chat) -> TelegramGroup? {
|
|
||||||
switch rhs {
|
|
||||||
case .chat, .chatEmpty, .chatForbidden, .channelForbidden:
|
|
||||||
return TelegramGroup(chat: rhs)
|
|
||||||
case let .channel(_, _, accessHash, title, _, photo, date, _, restrictionReason):
|
|
||||||
if let _ = accessHash {
|
|
||||||
return TelegramGroup(chat: rhs)
|
|
||||||
} else if let lhs = lhs {
|
|
||||||
return TelegramGroup(id: lhs.id, accessHash: lhs.accessHash, title: title, photo: imageRepresentationsForApiChatPhoto(photo), participantCount: lhs.participantCount, membership: lhs.membership, version: 0)
|
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public enum TelegramMediaActionType: Coding, Equatable {
|
public enum TelegramMediaActionType: Coding, Equatable {
|
||||||
case unknown
|
case unknown
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public class TelegramCloudFileLocation: TelegramMediaLocation, TelegramCloudMediaLocation {
|
public class TelegramCloudFileLocation: TelegramMediaLocation, TelegramCloudMediaLocation {
|
||||||
public let datacenterId: Int
|
public let datacenterId: Int
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public final class TelegramMediaContact: Media {
|
public final class TelegramMediaContact: Media {
|
||||||
public let id: MediaId? = nil
|
public let id: MediaId? = nil
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
private let typeFileName: Int32 = 0
|
private let typeFileName: Int32 = 0
|
||||||
private let typeSticker: Int32 = 1
|
private let typeSticker: Int32 = 1
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public final class TelegramMediaImage: Media, Equatable {
|
public final class TelegramMediaImage: Media, Equatable {
|
||||||
public let imageId: MediaId
|
public let imageId: MediaId
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public protocol TelegramMediaLocation: Coding {
|
public protocol TelegramMediaLocation: Coding {
|
||||||
var uniqueId: String { get }
|
var uniqueId: String { get }
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public final class NamedGeoPlace: Coding {
|
public final class NamedGeoPlace: Coding {
|
||||||
public let country: String?
|
public let country: String?
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
import Postbox
|
|
||||||
|
|
||||||
public final class TelegramMediaVoiceNote: Media {
|
|
||||||
public let id: MediaId?
|
|
||||||
public let voiceNoteId: MediaId
|
|
||||||
public let duration: Int
|
|
||||||
public let mimeType: String
|
|
||||||
public let size: Int
|
|
||||||
public let peerIds: [PeerId] = []
|
|
||||||
|
|
||||||
public init(voiceNoteId: MediaId, duration: Int, mimeType: String, size: Int) {
|
|
||||||
self.id = voiceNoteId
|
|
||||||
self.voiceNoteId = voiceNoteId
|
|
||||||
self.duration = duration
|
|
||||||
self.mimeType = mimeType
|
|
||||||
self.size = size
|
|
||||||
}
|
|
||||||
|
|
||||||
public init(decoder: Decoder) {
|
|
||||||
self.voiceNoteId = MediaId(decoder.decodeBytesForKeyNoCopy("i"))
|
|
||||||
self.id = self.voiceNoteId
|
|
||||||
self.duration = Int(decoder.decodeInt32ForKey("d"))
|
|
||||||
self.mimeType = decoder.decodeStringForKey("m")
|
|
||||||
self.size = Int(decoder.decodeInt32ForKey("s"))
|
|
||||||
}
|
|
||||||
|
|
||||||
public func encode(_ encoder: Encoder) {
|
|
||||||
let buffer = WriteBuffer()
|
|
||||||
self.voiceNoteId.encodeToBuffer(buffer)
|
|
||||||
encoder.encodeBytes(buffer, forKey: "i")
|
|
||||||
encoder.encodeInt32(Int32(self.duration), forKey: "d")
|
|
||||||
encoder.encodeString(self.mimeType, forKey: "m")
|
|
||||||
encoder.encodeInt32(Int32(self.size), forKey: "s")
|
|
||||||
}
|
|
||||||
|
|
||||||
public func isEqual(_ other: Media) -> Bool {
|
|
||||||
if let other = other as? TelegramMediaVoiceNote {
|
|
||||||
if other.voiceNoteId == self.voiceNoteId && other.duration == self.duration && other.mimeType == self.mimeType && other.size == self.size {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public final class TelegramMediaWebpageLoadedContent: Coding, Equatable {
|
public final class TelegramMediaWebpageLoadedContent: Coding, Equatable {
|
||||||
public let url: String
|
public let url: String
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public final class TelegramUser: Peer, Coding {
|
public final class TelegramUser: Peer {
|
||||||
public let id: PeerId
|
public let id: PeerId
|
||||||
public let accessHash: Int64?
|
public let accessHash: Int64?
|
||||||
public let firstName: String?
|
public let firstName: String?
|
||||||
@ -114,10 +118,6 @@ public final class TelegramUser: Peer, Coding {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func telegramImageMediaRepresentationFromUserProfilePhoto() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public extension TelegramUser {
|
public extension TelegramUser {
|
||||||
public convenience init(user: Api.User) {
|
public convenience init(user: Api.User) {
|
||||||
switch user {
|
switch user {
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public enum MessageTextEntityType {
|
public enum MessageTextEntityType {
|
||||||
case Unknown
|
case Unknown
|
||||||
|
|||||||
@ -1,7 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import MtProtoKit
|
#if os(macOS)
|
||||||
import Postbox
|
import PostboxMac
|
||||||
import SwiftSignalKit
|
import SwiftSignalKitMac
|
||||||
|
import MtProtoKitMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
import SwiftSignalKit
|
||||||
|
import MtProtoKitDynamic
|
||||||
|
#endif
|
||||||
|
|
||||||
class UpdateMessageService: NSObject, MTMessageService {
|
class UpdateMessageService: NSObject, MTMessageService {
|
||||||
var peerId: PeerId!
|
var peerId: PeerId!
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
extension Api.Message {
|
extension Api.Message {
|
||||||
var id: Int32 {
|
var id: Int32 {
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Postbox
|
#if os(macOS)
|
||||||
|
import PostboxMac
|
||||||
|
#else
|
||||||
|
import Postbox
|
||||||
|
#endif
|
||||||
|
|
||||||
public class ViewCountMessageAttribute: MessageAttribute {
|
public class ViewCountMessageAttribute: MessageAttribute {
|
||||||
let count: Int
|
let count: Int
|
||||||
|
|||||||
26
TelegramCoreMac/Info.plist
Normal file
26
TelegramCoreMac/Info.plist
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2016 Peter. All rights reserved.</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
19
TelegramCoreMac/TelegramCoreMac.h
Normal file
19
TelegramCoreMac/TelegramCoreMac.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
//
|
||||||
|
// TelegramCoreMac.h
|
||||||
|
// TelegramCoreMac
|
||||||
|
//
|
||||||
|
// Created by Peter on 9/5/16.
|
||||||
|
// Copyright © 2016 Peter. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
//! Project version number for TelegramCoreMac.
|
||||||
|
FOUNDATION_EXPORT double TelegramCoreMacVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for TelegramCoreMac.
|
||||||
|
FOUNDATION_EXPORT const unsigned char TelegramCoreMacVersionString[];
|
||||||
|
|
||||||
|
// In this header, you should import all the public headers of your framework using statements like #import <TelegramCoreMac/PublicHeader.h>
|
||||||
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user