Skip to content

Commit

Permalink
Merge feature/videoMessages into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jkubuni committed Jun 14, 2024
2 parents a078c59 + c63c932 commit cbaa0a0
Show file tree
Hide file tree
Showing 59 changed files with 397 additions and 65 deletions.
122 changes: 68 additions & 54 deletions .squot-materialize
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,112 @@
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'pull_request_template.md'
'discord_actions.yml'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'ci-linter.yml'
'.smalltalk.release.ston'
],
#encoding : 'TXT'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'TelegramClient-Core'
#name : 'TelegramClientTests-Core'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotCypressMapper {
#package : MCPackage {
#name : 'TelegramClientTests-Misc'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.smalltalk.release.ston'
'.smalltalk.lint.ston'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.squot'
'.github',
'ISSUE_TEMPLATE',
'bug_report.md'
],
#encoding : 'TXT'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'BaselineOfTelegramClient'
#name : 'TelegramClient-UI'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.smalltalk.ston'
'.github',
'ISSUE_TEMPLATE',
'feature_request.md'
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'logo.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'ISSUE_TEMPLATE',
'feature_request.md'
'.gitignore'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'LICENSE'
],
#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'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'discord_actions.yml'
'workflows',
'ci-linter.yml'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.gitignore'
'README.md'
],
#encoding : 'TXT'
},
Expand All @@ -79,7 +121,8 @@
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'LICENSE'
'.github',
'stale.yml'
],
#encoding : 'TXT'
},
Expand All @@ -93,80 +136,51 @@
},
SquotCypressMapper {
#package : MCPackage {
#name : 'TelegramClient-UI'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'logo.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'CONTRIBUTING.md'
],
#encoding : 'TXT'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'TelegramClientTests-Misc'
#name : 'BaselineOfTelegramClient'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'release.yml'
'scripts',
'preLoading.st'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'stale.yml'
'.smalltalk.ston'
],
#encoding : 'TXT'
},
SquotCypressMapper {
#package : MCPackage {
#name : 'TelegramClientTests-Core'
#name : 'TelegramClient-Core'
},
#path : FSAbsolutePath [
'packages'
]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'README.md'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.smalltalk.lint.ston'
'.squot'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'ISSUE_TEMPLATE',
'bug_report.md'
'workflows',
'release.yml'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'scripts',
'preLoading.st'
'.github',
'pull_request_template.md'
],
#encoding : 'TXT'
}
Expand Down
Binary file added assets/play_circle_outline_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/playbutton.jpg
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
Expand Up @@ -8,6 +8,7 @@ initialize
pendingRequests: Dictionary new;
userStore: (TCCUserStore newWith: self);
imageStore: (TCCImageStore newWith: self);
videoStore: (TCCVideoStore newWith: self);
callbackCounter: 0.

"Mac users report serious slowdowns when receiveLoop is running at lower priority"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
videoStore: aVideoStore

videoStore := aVideoStore.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
videoStore

^ videoStore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"handlePendingEvent:" : "per 8/2/2021 15:05",
"imageStore" : "pk 6/19/2021 17:15",
"imageStore:" : "TR 6/22/2021 09:33",
"initialize" : "pk 8/5/2021 17:09",
"initialize" : "JK 6/12/2024 19:42",
"initializeHandlers" : "RS 8/1/2021 12:53",
"isClientAlive" : "js 5/28/2020 17:18",
"loggedInUserId" : "pk 8/5/2021 17:04",
Expand All @@ -39,4 +39,6 @@
"tryHandleError:" : "aka 5/21/2022 12:07",
"update" : "rgw 7/24/2022 15:08",
"userStore" : "per 7/15/2021 12:56",
"userStore:" : "tr 7/25/2021 17:57" } }
"userStore:" : "tr 7/25/2021 17:57",
"videoStore" : "JK 6/12/2024 19:42",
"videoStore:" : "JK 6/12/2024 19:43" } }
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"loggedInUserId",
"pendingRequests",
"callbackCounter",
"userStore" ],
"userStore",
"videoStore" ],
"name" : "TCCCore",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A TCCImageStore is a cache for local image files on disk with a synchronous interface.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
utility
extractPathFrom: anEvent

^ (anEvent at: 'local') at: 'path'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
newWith: aCore

^ self new
core: aCore;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
core: aCore

core := aCore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
core

^ core
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
utility
requestFileFor: aFileId with: aPromise

"documented here:"
"https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1download_file.html"

self core
send: (TCCRequest newRequestFile: aFileId)
thenDo: [:fileEvent | aPromise resolveWith: (self class extractPathFrom: fileEvent)].
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"class" : {
"extractPathFrom:" : "JK 6/12/2024 19:32",
"newWith:" : "pk 6/19/2021 18:09" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"requestFileFor:with:" : "JK 6/12/2024 19:23" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "TelegramClient-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "<historical>",
"instvars" : [
"core" ],
"name" : "TCCFileStore",
"pools" : [
],
"super" : "Dictionary",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"imageFormFrom:" : "pk 8/5/2021 16:52",
"newWith:" : "pk 6/19/2021 18:09" },
"newWith:" : " 6/14/2024 09:21:38" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"core" : " 6/14/2024 09:21:38",
"core:" : " 6/14/2024 09:21:38",
"getFormFor:" : "rgw 6/6/2022 18:51",
"getFormPromiseFor:" : "rgw 6/6/2022 18:43",
"requestImageFor:with:" : "rgw 6/2/2022 11:17" } }
"requestImageFor:with:" : "JK 6/12/2024 19:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
],
"commentStamp" : "pk 6/19/2021 16:13",
"instvars" : [
"core" ],
],
"name" : "TCCImageStore",
"pools" : [
],
"super" : "Dictionary",
"super" : "TCCFileStore",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ newMessageWith: aJsonObject
^ (aJsonObject at: '@type') caseOf: {
['messageText'] -> [TCCTextMessage newFrom: aJsonObject].
['messagePhoto'] -> [TCCPhotoMessage newFrom: aJsonObject].
['messageVideo'] -> [TCCVideoMessage newFrom: aJsonObject].
['messageChatAddMembers'] -> [TCCAddMembersMessage newFrom: aJsonObject].
['messageChatDeleteMember'] -> [TCCDeleteMemberMessage newFrom: aJsonObject].
} otherwise: [TCCNotSupportedMessage new]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
"maxReplySnippetSize" : "rgw 5/12/2022 16:05",
"newFromMessageEvent:in:with:" : "rgw 6/2/2022 09:01",
"newMessageWith:" : "js 7/31/2022 09:28",
"newMessageWith:" : "JK 6/12/2024 11:30",
"timeStampToDateAndTime:" : "JB 5/16/2021 09:42" },
"instance" : {
"asReplySnippet" : "rgw 5/12/2022 16:05",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data-represantation of a single message with a photo in a chat
Loading

0 comments on commit cbaa0a0

Please sign in to comment.