Skip to content

Commit

Permalink
Merge feature/sendPicsVideos into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Elia Doumerc committed Jun 26, 2024
2 parents 192087c + 9739c9d commit 71a8ce6
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 77 deletions.
155 changes: 81 additions & 74 deletions .squot-materialize
Original file line number Diff line number Diff line change
@@ -1,152 +1,150 @@
[
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'
]
},
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 [
Expand All @@ -157,7 +155,15 @@
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.smalltalk.ston'
'LICENSE'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'release.yml'
],
#encoding : 'TXT'
},
Expand All @@ -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
}
]
Binary file added assets/default_video_thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
instance creation
newSendDocumentMessage: aDocumentPath to: aChatId
Transcript show: aDocumentPath.
self halt.

^ TCCRequest
newWithType: 'sendMessage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 71a8ce6

Please sign in to comment.