-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge origin/feature/sticker into develop
- Loading branch information
Showing
128 changed files
with
776 additions
and
30 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
data-represantation of a single text message in a chat |
6 changes: 6 additions & 0 deletions
6
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/class/newFrom..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
instance creation | ||
newFrom: aJsonObject | ||
|
||
^ self new | ||
text: ((aJsonObject at: 'sticker') at: 'emoji'); | ||
yourself |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/instance/asSnippet.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
asSnippet | ||
|
||
^ self text |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/instance/asText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
asText | ||
|
||
^ self text |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/instance/text..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
text: aString | ||
|
||
text := aString |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/instance/text.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
text | ||
|
||
^ text |
8 changes: 8 additions & 0 deletions
8
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"class" : { | ||
"newFrom:" : "JK 5/31/2024 11:40" }, | ||
"instance" : { | ||
"asSnippet" : "RK 6/26/2021 11:37", | ||
"asText" : "rgw 5/12/2022 14:28", | ||
"text" : "TR 6/20/2021 10:17", | ||
"text:" : "pk 8/4/2021 11:47" } } |
14 changes: 14 additions & 0 deletions
14
packages/TelegramClient-Core.package/TCCAnimatedStickerMessage.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "TelegramClient-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "<historical>", | ||
"instvars" : [ | ||
"text" ], | ||
"name" : "TCCAnimatedStickerMessage", | ||
"pools" : [ | ||
], | ||
"super" : "TCCMessage", | ||
"type" : "normal" } |
5 changes: 5 additions & 0 deletions
5
packages/TelegramClient-Core.package/TCCChat.class/instance/sendStickerMessage..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sending | ||
sendStickerMessage: aStickerPath | ||
|
||
self core send: (TCCRequest newSendStickerMessage: aStickerPath asString to: self id). | ||
self selectedReplyToMessageId: self class defaultSelectedReplyToMessageId. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCCore.class/instance/stickerStore..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
stickerStore: aStickerStore | ||
|
||
stickerStore := aStickerStore. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCCore.class/instance/stickerStore.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
stickerStore | ||
|
||
^ stickerStore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
4 changes: 4 additions & 0 deletions
4
...bP.class/class/WebPDecodeBGRAInto.dataSize.outputBuffer.outputBufferSize.outputStride..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
as yet unclassified | ||
WebPDecodeBGRAInto: aPointer1 dataSize: aNumber1 outputBuffer: aPointer2 outputBufferSize: aNumber2 outputStride: aNumber3 | ||
<cdecl: uint8_t* 'WebPDecodeBGRAInto'(uint8_t*, size_t, uint8_t*, size_t, long) module: 'libwebp'> | ||
^self externalCallFailed |
4 changes: 4 additions & 0 deletions
4
.../TelegramClient-Core.package/TCCLibWebP.class/class/WebPGetInfo.dataSize.width.height..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
as yet unclassified | ||
WebPGetInfo: aPointer1 dataSize: aNumber width: aPointer2 height: aPointer3 | ||
<cdecl: long 'WebPGetInfo'(uint8_t*, size_t, long*, long*) module: 'libwebp'> | ||
^self externalCallFailed |
12 changes: 12 additions & 0 deletions
12
packages/TelegramClient-Core.package/TCCLibWebP.class/class/decode..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
as yet unclassified | ||
decode: aByteArray | ||
"decodes a WebP image from a ByteArray and returns the result Form or nil in case of an error" | ||
|
||
| dimensions decodedImage result | | ||
|
||
dimensions := self getFileInfo: aByteArray. | ||
dimensions ifNil: [ ^nil ]. | ||
decodedImage := ByteArray new: (dimensions x) * (dimensions y) * 4. | ||
result := self WebPDecodeBGRAInto: aByteArray dataSize: aByteArray size outputBuffer: decodedImage outputBufferSize: decodedImage size outputStride: dimensions x * 4. | ||
(result isNull) ifFalse: [ ^ self formFrom: decodedImage dimensions: dimensions ]. | ||
^ nil |
12 changes: 12 additions & 0 deletions
12
packages/TelegramClient-Core.package/TCCLibWebP.class/class/formFrom.dimensions..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
as yet unclassified | ||
formFrom: aByteArray dimensions: aPoint | ||
"creates a Form from an BGRA ByteArray" | ||
|
||
^ Form | ||
extent: aPoint | ||
depth: 32 | ||
bits: ((Bitmap new: aByteArray size / 4) | ||
fromByteStream: aByteArray readStream; | ||
yourself) | ||
|
||
|
13 changes: 13 additions & 0 deletions
13
packages/TelegramClient-Core.package/TCCLibWebP.class/class/getFileInfo..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
as yet unclassified | ||
getFileInfo: aByteArray | ||
"returns the dimensions of the given image or nil if it is not a valid WebP format" | ||
|
||
| result widthHandle heightHandle | | ||
|
||
widthHandle := ExternalType long allocate. | ||
heightHandle := ExternalType long allocate. | ||
result := TCCLibWebP WebPGetInfo: aByteArray dataSize: aByteArray size width: widthHandle height: heightHandle. | ||
(result = 1) | ||
ifTrue: [^ (widthHandle at: 1)@(heightHandle at: 1)] | ||
ifFalse: [ ^ nil ] | ||
|
9 changes: 9 additions & 0 deletions
9
packages/TelegramClient-Core.package/TCCLibWebP.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"class" : { | ||
"WebPDecodeBGRAInto:dataSize:outputBuffer:outputBufferSize:outputStride:" : "TU 5/18/2024 15:20", | ||
"WebPGetInfo:dataSize:width:height:" : "TU 5/18/2024 01:44", | ||
"decode:" : "TU 5/22/2024 19:22", | ||
"formFrom:dimensions:" : "TU 5/22/2024 19:21", | ||
"getFileInfo:" : "TU 5/29/2024 15:05" }, | ||
"instance" : { | ||
} } |
14 changes: 14 additions & 0 deletions
14
packages/TelegramClient-Core.package/TCCLibWebP.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"category" : "TelegramClient-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "TCCLibWebP", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/TelegramClient-Core.package/TCCRequest.class/class/getInstalledStickerSets.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
instance creation | ||
getInstalledStickerSets | ||
|
||
^ TCCRequest | ||
newWithType: 'getInstalledStickerSets' | ||
from: {} |
7 changes: 7 additions & 0 deletions
7
packages/TelegramClient-Core.package/TCCRequest.class/class/getStickerSetFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
instance creation | ||
getStickerSetFor: aStickerSetId | ||
|
||
^ TCCRequest | ||
newWithType: 'getStickerSet' | ||
from: { | ||
'set_id' -> aStickerSetId} |
12 changes: 12 additions & 0 deletions
12
packages/TelegramClient-Core.package/TCCRequest.class/class/newRequestSticker..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
instance creation | ||
newRequestSticker: aStickerId | ||
|
||
^ TCCRequest | ||
newWithType: 'downloadFile' | ||
from: { | ||
'file_id'->aStickerId. | ||
'priority'->32. | ||
'offset'->0. | ||
'limit'->0. | ||
'synchronous' -> true. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/TelegramClient-Core.package/TCCRequest.class/class/newSendStickerMessage.to..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
instance creation | ||
newSendStickerMessage: aStickerPath to: aChatId | ||
|
||
^ TCCRequest | ||
newWithType: 'sendMessage' | ||
from: { | ||
'chat_id' -> aChatId. | ||
'input_message_content' -> (Dictionary newFrom: { | ||
'@type' -> 'inputMessageSticker'. | ||
'sticker' -> (Dictionary newFrom: { | ||
'@type' -> 'inputFileLocal'. | ||
'path' -> aStickerPath. | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
4 changes: 4 additions & 0 deletions
4
...ages/TelegramClient-Core.package/TCCStickerMessage.class/class/newAnimatedStickerFrom..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
instance creation | ||
newAnimatedStickerFrom: aJsonObject | ||
|
||
^ TCCAnimatedStickerMessage newFrom: aJsonObject. |
13 changes: 13 additions & 0 deletions
13
packages/TelegramClient-Core.package/TCCStickerMessage.class/class/newFrom..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
instance creation | ||
newFrom: aJsonObject | ||
|
||
| stickerData | | ||
stickerData := (aJsonObject at: 'sticker'). | ||
(stickerData at: 'is_animated') ifTrue: | ||
[^ self newAnimatedStickerFrom: aJsonObject]. | ||
|
||
^ self new | ||
width: (stickerData at: 'width'); | ||
height: (stickerData at: 'height'); | ||
stickerId: ((stickerData at: 'sticker') at: 'id'); | ||
yourself |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/asSnippet.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
asSnippet | ||
|
||
^ 'Sticker' |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/asText.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
asText | ||
|
||
^ 'Sticker' |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/height..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
height: aNumber | ||
|
||
height := aNumber. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/height.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
height | ||
|
||
^ height |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/stickerId..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
stickerId: aNumber | ||
|
||
stickerId := aNumber. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/stickerId.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
stickerId | ||
|
||
^ stickerId |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/width..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
width: aNumber | ||
|
||
width := aNumber. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCStickerMessage.class/instance/width.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
width | ||
|
||
^ width |
Oops, something went wrong.