Skip to content

Commit

Permalink
Merge develop into feature/sendPics
Browse files Browse the repository at this point in the history
  • Loading branch information
Elia Doumerc committed Jun 23, 2024
2 parents 58570e6 + 8a3cc0c commit 116b3b9
Show file tree
Hide file tree
Showing 145 changed files with 869 additions and 119 deletions.
22 changes: 14 additions & 8 deletions .squot-materialize
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'file-icon.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
Expand Down Expand Up @@ -117,7 +123,7 @@
'assets',
'logo.png'
],
#encoding : Class [ #PNGReadWriter ]
#encoding : @6
},
SquotCypressMapper {
#package : MCPackage {
Expand Down Expand Up @@ -169,19 +175,19 @@
],
#encoding : Class [ #JPEGReadWriter2 ]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play_circle_outline_icon.png'
],
#encoding : @6
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'ci-linter.yml'
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play_circle_outline_icon.png'
],
#encoding : @40
}
]
Binary file modified 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.
Binary file added file-icon.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,6 +1,6 @@
{
"class" : {
"newFrom:" : "JK 5/31/2024 11:40" },
"newFrom:" : "JK 6/23/2024 11:47" },
"instance" : {
"asSnippet" : "RK 6/26/2021 11:37",
"asText" : "rgw 5/12/2022 14:28",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ initialize
imageStore: (TCCImageStore newWith: self);
videoStore: (TCCVideoStore newWith: self);
stickerStore: (TCCStickerStore newWith: self);
callbackCounter: 0.

callbackCounter: 0.

"Mac users report serious slowdowns when receiveLoop is running at lower priority"
"So we have to rely on just the delay"
Expand Down
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" : "TU 6/14/2024 09:38",
"initialize" : "JK 6/20/2024 22:16",
"initializeHandlers" : "RS 8/1/2021 12:53",
"isClientAlive" : "js 5/28/2020 17:18",
"loggedInUserId" : "pk 8/5/2021 17:04",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data-represantation of a single text message in a chat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
newFrom: aJsonObject

^ self new
filename: ((aJsonObject at: 'document') at: 'file_name');
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
asSnippet

^ self filename
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
asText

^ self filename
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
filename: aString

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

^ filename
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"class" : {
"newFrom:" : "JK 6/23/2024 11:52" },
"instance" : {
"asSnippet" : "AH 6/21/2024 13:54",
"asText" : "AH 6/21/2024 13:54",
"filename" : "AH 6/21/2024 13:54",
"filename:" : "AH 6/21/2024 13:55" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "TelegramClient-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "<historical>",
"instvars" : [
"filename" ],
"name" : "TCCDocumentMessage",
"pools" : [
],
"super" : "TCCMessage",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
utility
imageFormFrom: aString

^ Form fromFileNamed: aString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
utility
getFormFor: anImageId

| promise |
promise := self getFormPromiseFor: anImageId.
promise wait.
^ promise value
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
utility
getFormPromiseFor: anImageId

| promise |
promise := self at: anImageId ifAbsent: [
self at: anImageId put: Promise new.
self requestFileFor: anImageId with: (self at: anImageId).
self at: anImageId
].
^ promise >>= [:aPath | self class imageFormFrom: aPath]
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"class" : {
"extractPathFrom:" : "JK 6/12/2024 19:32",
"imageFormFrom:" : "JK 6/21/2024 13:53",
"newWith:" : "pk 6/19/2021 18:09" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"getFormFor:" : "JK 6/21/2024 13:30",
"getFormPromiseFor:" : "JK 6/21/2024 13:47",
"requestFileFor:with:" : "JK 6/12/2024 19:23" } }
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"imageFormFrom:" : "pk 8/5/2021 16:52",
"newWith:" : "6/14/2024 09:21:38" },
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "6/23/2024 14:02:55",
"newWith:" : "6/23/2024 14:02:55" },
"instance" : {
"core" : "6/14/2024 09:21:38",
"core:" : "6/14/2024 09:21:38",
"getFormFor:" : "JK 5/16/2024 22:13",
"getFormPromiseFor:" : "rgw 6/6/2022 18:43",
"requestImageFor:with:" : "JK 6/12/2024 19:46" } }
"core" : "6/23/2024 14:02:55",
"core:" : "6/23/2024 14:02:55",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"requestImageFor:with:" : "6/22/2024 13:42:57" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ newMessageWith: aJsonObject
['messagePhoto'] -> [TCCPhotoMessage newFrom: aJsonObject].
['messageVideo'] -> [TCCVideoMessage newFrom: aJsonObject].
['messageSticker'] -> [TCCStickerMessage newFrom: aJsonObject].
['messageDocument'] -> [TCCDocumentMessage 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:" : "TU 6/14/2024 09:39",
"newMessageWith:" : "AH 6/21/2024 14:29",
"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
Expand Up @@ -22,7 +22,7 @@
"newSendMessage:to:asReplyTo:" : "JS 5/20/2022 10:02",
"newSendPhoneNumber:" : "RS 6/23/2021 16:34",
"newSendPhotoMessage:to:" : "ED 6/19/2024 12:10",
"newSendStickerMessage:to:" : "JK 5/28/2024 10:52",
"newSendStickerMessage:to:" : "JK 6/21/2024 14:08",
"newSendVideoMessage:to:" : "ED 6/19/2024 12:22",
"newSetPollAnswer:message:options:" : "TU 6/6/2024 01:15",
"newUser:" : "JB 8/1/2021 11:55",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
asSnippet

^ 'Sticker'
^ 'Sticker: ', self stickerId
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"class" : {
"newAnimatedStickerFrom:" : "JK 5/31/2024 11:36",
"newFrom:" : "JK 5/31/2024 11:11" },
"newFrom:" : "JK 6/23/2024 11:39" },
"instance" : {
"asSnippet" : "JK 5/16/2024 16:00",
"asSnippet" : "JK 6/23/2024 14:32",
"asText" : "JK 5/16/2024 16:00",
"height" : "JK 5/16/2024 16:01",
"height:" : "JK 5/16/2024 16:01",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
utility
imageFormFrom: aString

| file byteArray |
file := FileStream fileNamed: aString.
file binary.
byteArray := file next: file size.
file close.
^ (TCCLibWebP decode: byteArray).
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ newWith: aCore

^ self new
core: aCore;
stickerIds: OrderedCollection new;
yourself
stickerSets: Dictionary new;
yourself.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
as yet unclassified
downloadStickerSet: aStickerSet


self storeStickerSet: aStickerSet.
(aStickerSet at: 'stickers') do: [:sticker |
self stickerIds add: ((sticker at: 'sticker') at: 'id').
self getFormPromiseFor: ((sticker at: 'sticker') at: 'id')].
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
as yet unclassified
loadStickerIds

| sets |

self core send: (TCCRequest getInstalledStickerSets)
thenDo: [:stickerEvent | sets := stickerEvent at: 'sets'.
sets do: [:setInfo | self core send: (TCCRequest getStickerSetFor: (setInfo at: 'id'))
thenDo: [:set | (set at: 'is_animated') ifFalse: [self storeStickerSet: set.]]]].
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
stickerSets: aDictionary

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

^ stickerSets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
utility
storeStickerSet: aStickerSet

| stickers |

self stickerSets at: (aStickerSet at: 'id') ifAbsent: [
stickers := OrderedCollection new.
(aStickerSet at: 'stickers') do: [:sticker |
stickers add: ((sticker at: 'sticker') at: 'id')].
self stickerSets at: (aStickerSet at: 'id') put: stickers]
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"newWith:" : "JK 6/5/2024 12:01",
"stickerFormFrom:" : "JK 6/5/2024 11:15" },
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "JK 6/21/2024 13:46",
"newWith:" : "JK 6/20/2024 22:18",
"stickerFormFrom:" : "6/23/2024 14:02:55" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"downloadStickerSet:" : "JK 6/5/2024 12:07",
"getFormFor:" : "JK 6/5/2024 11:12",
"getFormPromiseFor:" : "JK 5/16/2024 21:21",
"getInstalledStickers" : "JK 6/5/2024 11:37",
"core" : "6/23/2024 14:02:55",
"core:" : "6/23/2024 14:02:55",
"downloadStickerSet:" : "JK 6/19/2024 11:33",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"getInstalledStickers" : "6/23/2024 17:46:17",
"loadStickerIds" : "JK 6/20/2024 23:39",
"requestStickerFor:with:" : "JK 5/16/2024 21:40",
"stickerIds" : "JK 6/5/2024 11:41",
"stickerIds:" : "JK 6/5/2024 11:41" } }
"stickerIds" : "6/23/2024 17:46:17",
"stickerIds:" : "6/23/2024 17:46:17",
"stickerSets" : "JK 6/19/2024 11:30",
"stickerSets:" : "JK 6/19/2024 11:30",
"storeStickerSet:" : "JK 6/23/2024 16:33" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
],
"commentStamp" : "<historical>",
"instvars" : [
"core",
"stickerIds" ],
"stickerSets" ],
"name" : "TCCStickerStore",
"pools" : [
],
"super" : "Dictionary",
"super" : "TCCFileStore",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"newFrom:" : "JK 6/12/2024 11:28" },
"newFrom:" : "JK 6/23/2024 11:14" },
"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
@@ -1,9 +1,9 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"imageFormFrom:" : "pk 8/5/2021 16:52" },
"extractPathFrom:" : "6/23/2024 14:02:55",
"imageFormFrom:" : "6/23/2024 14:02:55" },
"instance" : {
"getFormFor:" : "JK 6/12/2024 19:28",
"getFormPromiseFor:" : "JK 6/12/2024 19:30",
"getFormFor:" : "6/23/2024 14:02:55",
"getFormPromiseFor:" : "6/23/2024 14:02:55",
"getVideoFor:" : "JK 6/12/2024 19:48",
"getVideoPromiseFor:" : "JK 6/12/2024 19:56" } }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ stepping and presenter
createDayDividerForDate: aDate

| messageItem |
messageItem := TCUDayDividerMessage newFromDate: aDate.
messageItem := TCUDayDivider newFromDate: aDate.

^ TCUDayDividerMessageWrapper newFromMessage: messageItem withWidth: self scroller width
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"chat" : "js 7/31/2020 16:39",
"chat:" : "js 7/31/2020 16:39",
"core" : "JB 6/26/2021 10:22",
"createDayDividerForDate:" : "js 7/31/2022 10:20",
"createDayDividerForDate:" : "AH 6/23/2024 13:00",
"createMessageItemFrom:" : "js 7/31/2022 10:02",
"displayChat:" : "RS 7/17/2021 11:54",
"initialize" : "RS 7/17/2021 17:40",
Expand Down
Loading

0 comments on commit 116b3b9

Please sign in to comment.