diff --git a/.squot-materialize b/.squot-materialize index cf543e55..84088771 100644 --- a/.squot-materialize +++ b/.squot-materialize @@ -1,50 +1,46 @@ [ SquotPlaintextMapper { #path : FSAbsolutePath [ - '.github', - 'discord_actions.yml' + '.squot' ], #encoding : 'TXT' }, - SquotPlaintextMapper { + SquotImageMapper { #path : FSAbsolutePath [ - '.smalltalk.release.ston' + 'file-icon.png' ], - #encoding : 'TXT' + #encoding : Class [ #PNGReadWriter ] }, - SquotCypressMapper { - #package : MCPackage { - #name : 'TelegramClientTests-Core' - }, + SquotPlaintextMapper { #path : FSAbsolutePath [ - 'packages' - ] + '.github', + 'discord_actions.yml' + ], + #encoding : 'TXT' }, - SquotCypressMapper { - #package : MCPackage { - #name : 'TelegramClientTests-Misc' - }, + SquotPlaintextMapper { #path : FSAbsolutePath [ - 'packages' - ] + '.github', + 'ISSUE_TEMPLATE', + 'feature_request.md' + ], + #encoding : 'TXT' }, SquotPlaintextMapper { #path : FSAbsolutePath [ - '.smalltalk.lint.ston' + '.gitignore' ], #encoding : 'TXT' }, SquotPlaintextMapper { #path : FSAbsolutePath [ - '.github', - 'ISSUE_TEMPLATE', - 'bug_report.md' + 'CONTRIBUTING.md' ], #encoding : 'TXT' }, SquotCypressMapper { #package : MCPackage { - #name : 'TelegramClient-UI' + #name : 'TelegramClientTests-UI' }, #path : FSAbsolutePath [ 'packages' @@ -52,101 +48,103 @@ }, SquotPlaintextMapper { #path : FSAbsolutePath [ - '.github', - 'ISSUE_TEMPLATE', - 'feature_request.md' + '.smalltalk.ston' ], #encoding : 'TXT' }, - SquotImageMapper { + SquotCypressMapper { + #package : MCPackage { + #name : 'BaselineOfTelegramClient' + }, #path : FSAbsolutePath [ - 'assets', - 'logo.png' - ], - #encoding : Class [ #PNGReadWriter ] + 'packages' + ] }, SquotPlaintextMapper { #path : FSAbsolutePath [ - '.gitignore' + 'README.md' ], #encoding : 'TXT' }, SquotPlaintextMapper { #path : FSAbsolutePath [ - 'LICENSE' + '.smalltalk.release.ston' ], #encoding : 'TXT' }, - SquotImageMapper { - #path : FSAbsolutePath [ - 'assets', - 'playbutton.jpg' - ], - #encoding : Class [ #JPEGReadWriter2 ] - }, - SquotImageMapper { - #path : FSAbsolutePath [ - 'assets', - 'play_circle_outline_icon.png' - ], - #encoding : @23 - }, SquotPlaintextMapper { #path : FSAbsolutePath [ - 'CONTRIBUTING.md' + '.github', + 'ISSUE_TEMPLATE', + 'bug_report.md' ], #encoding : 'TXT' }, + SquotCypressMapper { + #package : MCPackage { + #name : 'TelegramClient-UI' + }, + #path : FSAbsolutePath [ + 'packages' + ] + }, SquotPlaintextMapper { #path : FSAbsolutePath [ '.github', 'workflows', - 'ci-linter.yml' + 'main.yml' ], #encoding : 'TXT' }, SquotPlaintextMapper { #path : FSAbsolutePath [ - 'README.md' + '.github', + 'stale.yml' ], #encoding : 'TXT' }, - SquotPlaintextMapper { + SquotCypressMapper { + #package : MCPackage { + #name : 'TelegramClientTests-Misc' + }, #path : FSAbsolutePath [ - '.github', - 'workflows', - 'main.yml' - ], - #encoding : 'TXT' + 'packages' + ] }, SquotPlaintextMapper { #path : FSAbsolutePath [ '.github', - 'stale.yml' + 'pull_request_template.md' ], #encoding : 'TXT' }, SquotImageMapper { #path : FSAbsolutePath [ - 'file-icon.png' + 'assets', + 'logo.png' ], - #encoding : @23 + #encoding : @6 }, SquotCypressMapper { #package : MCPackage { - #name : 'TelegramClientTests-UI' + #name : 'TelegramClientTests-Core' }, #path : FSAbsolutePath [ 'packages' ] }, - SquotCypressMapper { - #package : MCPackage { - #name : 'BaselineOfTelegramClient' - }, + SquotPlaintextMapper { #path : FSAbsolutePath [ - 'packages' - ] + '.smalltalk.lint.ston' + ], + #encoding : 'TXT' + }, + SquotImageMapper { + #path : FSAbsolutePath [ + 'assets', + 'default_video_thumbnail.png' + ], + #encoding : @6 }, SquotPlaintextMapper { #path : FSAbsolutePath [ @@ -157,7 +155,15 @@ }, SquotPlaintextMapper { #path : FSAbsolutePath [ - '.smalltalk.ston' + 'LICENSE' + ], + #encoding : 'TXT' + }, + SquotPlaintextMapper { + #path : FSAbsolutePath [ + '.github', + 'workflows', + 'release.yml' ], #encoding : 'TXT' }, @@ -169,25 +175,26 @@ 'packages' ] }, - SquotPlaintextMapper { + SquotImageMapper { #path : FSAbsolutePath [ - '.squot' + 'assets', + 'playbutton.jpg' ], - #encoding : 'TXT' + #encoding : Class [ #JPEGReadWriter2 ] }, SquotPlaintextMapper { #path : FSAbsolutePath [ '.github', 'workflows', - 'release.yml' + 'ci-linter.yml' ], #encoding : 'TXT' }, - SquotPlaintextMapper { + SquotImageMapper { #path : FSAbsolutePath [ - '.github', - 'pull_request_template.md' + 'assets', + 'play_circle_outline_icon.png' ], - #encoding : 'TXT' + #encoding : @6 } ] \ No newline at end of file diff --git a/assets/default_video_thumbnail.png b/assets/default_video_thumbnail.png new file mode 100644 index 00000000..85b59800 Binary files /dev/null and b/assets/default_video_thumbnail.png differ diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/class/newSendDocumentMessage.to..st b/packages/TelegramClient-Core.package/TCCRequest.class/class/newSendDocumentMessage.to..st index 71239f48..fd438e24 100644 --- a/packages/TelegramClient-Core.package/TCCRequest.class/class/newSendDocumentMessage.to..st +++ b/packages/TelegramClient-Core.package/TCCRequest.class/class/newSendDocumentMessage.to..st @@ -1,5 +1,7 @@ instance creation newSendDocumentMessage: aDocumentPath to: aChatId + Transcript show: aDocumentPath. + self halt. ^ TCCRequest newWithType: 'sendMessage' diff --git a/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json index 09ed663a..42154753 100644 --- a/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json +++ b/packages/TelegramClient-Core.package/TCCRequest.class/methodProperties.json @@ -16,7 +16,7 @@ "newRequestFile:" : "JB 8/1/2021 11:35", "newRequestSticker:" : "JK 5/16/2024 21:39", "newSearchChatFrom:" : "RS 6/23/2021 16:38", - "newSendDocumentMessage:to:" : "JK 6/26/2024 14:29", + "newSendDocumentMessage:to:" : "ED 6/26/2024 14:59", "newSendFileMessage:to:" : "ED 6/19/2024 13:51", "newSendMessage:to:" : "6/7/2024 09:02:10", "newSendMessage:to:asReplyTo:" : "JS 5/20/2022 10:02", diff --git a/packages/TelegramClient-Core.package/TCCVideoMessage.class/class/newFrom..st b/packages/TelegramClient-Core.package/TCCVideoMessage.class/class/newFrom..st index 6738d4a0..30f1307c 100644 --- a/packages/TelegramClient-Core.package/TCCVideoMessage.class/class/newFrom..st +++ b/packages/TelegramClient-Core.package/TCCVideoMessage.class/class/newFrom..st @@ -3,6 +3,13 @@ newFrom: aJsonObject | thumbnailData | thumbnailData := ((aJsonObject at: 'video') at: 'thumbnail'). + thumbnailData = nil ifTrue: [ + thumbnailData := JsonObject newFrom: { + 'width' -> 810. + 'height' -> 452. + 'file' -> (JsonObject newFrom: {'id' -> -1}). + }. + ]. ^ self new caption: ((aJsonObject at: 'caption') at: 'text'); diff --git a/packages/TelegramClient-Core.package/TCCVideoMessage.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCVideoMessage.class/methodProperties.json index 76822336..9df8a1c3 100644 --- a/packages/TelegramClient-Core.package/TCCVideoMessage.class/methodProperties.json +++ b/packages/TelegramClient-Core.package/TCCVideoMessage.class/methodProperties.json @@ -1,6 +1,6 @@ { "class" : { - "newFrom:" : "JK 6/23/2024 11:14" }, + "newFrom:" : "ED 6/26/2024 14:59" }, "instance" : { "asSnippet" : "JK 6/12/2024 11:31", "asText" : "TR 6/20/2021 10:41", diff --git a/packages/TelegramClient-Core.package/TCCVideoStore.class/class/newWith..st b/packages/TelegramClient-Core.package/TCCVideoStore.class/class/newWith..st new file mode 100644 index 00000000..3a04884f --- /dev/null +++ b/packages/TelegramClient-Core.package/TCCVideoStore.class/class/newWith..st @@ -0,0 +1,13 @@ +utility +newWith: aCore + + |obj| + obj := super newWith: aCore. + + ((FileDirectory default / 'tdlib' / 'thumbnails') fileExists: 'default_video_thumbnail.png') ifFalse: [ + ((GitAssetLoader for: 'TelegramClient') loadForm: '/assets/default_video_thumbnail.png') writePNGfileNamed: ((FileDirectory default / 'tdlib' / 'thumbnails' / 'default_video_thumbnail.png') fullName). + ]. + + obj add: (Association key: -1 value: (Promise new initializeWithResolvedValue: ((FileDirectory default / 'tdlib' / 'thumbnails' / 'default_video_thumbnail.png') fullName))). + + ^ obj \ No newline at end of file diff --git a/packages/TelegramClient-Core.package/TCCVideoStore.class/methodProperties.json b/packages/TelegramClient-Core.package/TCCVideoStore.class/methodProperties.json index c788988d..3adf8138 100644 --- a/packages/TelegramClient-Core.package/TCCVideoStore.class/methodProperties.json +++ b/packages/TelegramClient-Core.package/TCCVideoStore.class/methodProperties.json @@ -1,7 +1,8 @@ { "class" : { "extractPathFrom:" : "6/23/2024 14:02:55", - "imageFormFrom:" : "6/23/2024 14:02:55" }, + "imageFormFrom:" : "6/23/2024 14:02:55", + "newWith:" : "ED 6/26/2024 14:50" }, "instance" : { "getFormFor:" : "6/23/2024 14:02:55", "getFormPromiseFor:" : "6/23/2024 14:02:55",