-
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 pull request #534 from hpi-swa-teaching/develop
Merge the work from Group 11 of the 2022 SWT I module into main
- Loading branch information
Showing
495 changed files
with
2,882 additions
and
500 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
packages/TelegramClient-Core.package/TCCAddMembersMessage.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 @@ | ||
Represents a message where members are added to a group. |
6 changes: 6 additions & 0 deletions
6
packages/TelegramClient-Core.package/TCCAddMembersMessage.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 | ||
members: (aJsonObject at: 'member_user_ids'); | ||
yourself |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAddMembersMessage.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 asText |
6 changes: 6 additions & 0 deletions
6
packages/TelegramClient-Core.package/TCCAddMembersMessage.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,6 @@ | ||
accessing | ||
asText | ||
|
||
| names | | ||
names := self members collect: [:aUserId | (self core userStore getUserFor: aUserId) fullName]. | ||
^ 'Added: ' , (names joinSeparatedBy: ', ') |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAddMembersMessage.class/instance/members..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 | ||
members: aList | ||
|
||
members := aList |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCAddMembersMessage.class/instance/members.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 | ||
members | ||
|
||
^ members |
8 changes: 8 additions & 0 deletions
8
packages/TelegramClient-Core.package/TCCAddMembersMessage.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:" : "LR 7/23/2022 10:06" }, | ||
"instance" : { | ||
"asSnippet" : "rgw 7/21/2022 14:15", | ||
"asText" : "LR 7/23/2022 10:59", | ||
"members" : "rgw 7/21/2022 13:33", | ||
"members:" : "rgw 7/21/2022 13:33" } } |
14 changes: 14 additions & 0 deletions
14
packages/TelegramClient-Core.package/TCCAddMembersMessage.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" : "ek 8/4/2022 10:39", | ||
"instvars" : [ | ||
"members" ], | ||
"name" : "TCCAddMembersMessage", | ||
"pools" : [ | ||
], | ||
"super" : "TCCMessage", | ||
"type" : "normal" } |
4 changes: 4 additions & 0 deletions
4
...ient-Core.package/TCCAuthenticationHandler.class/instance/checkAuthenticationPassword..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 @@ | ||
library calls | ||
checkAuthenticationPassword: aString | ||
|
||
self core send: (TCCRequest newCheckAuthenticationPassword: aString). |
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
...gramClient-Core.package/TCCAuthenticationHandler.class/instance/isAwaitingAuthPassword.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 | ||
isAwaitingAuthPassword | ||
|
||
^ self authState = 'authorizationStateWaitPassword' |
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/TCCChat.class/class/defaultLastMessageDate.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 @@ | ||
default values | ||
defaultLastMessageDate | ||
|
||
^ DateAndTime fromUnixTime: 0 |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/class/defaultLastMessageSenderId.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 @@ | ||
default values | ||
defaultLastMessageSenderId | ||
|
||
^ 0 |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/class/defaultSelectedReplyToMessageId.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 @@ | ||
default values | ||
defaultSelectedReplyToMessageId | ||
|
||
^ 0 |
7 changes: 7 additions & 0 deletions
7
packages/TelegramClient-Core.package/TCCChat.class/instance/addMessage..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 @@ | ||
adding | ||
addMessage: aMessage | ||
|
||
self messageDictionary at: aMessage id ifAbsent: [ | ||
self messageDictionary at: aMessage id put: Promise new | ||
]. | ||
(self messageDictionary at: aMessage id) resolveWith: aMessage. |
11 changes: 10 additions & 1 deletion
11
packages/TelegramClient-Core.package/TCCChat.class/instance/addNewestMessage..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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
adding | ||
addNewestMessage: aMessage | ||
|
||
self messages addFirst: aMessage. | ||
| newDate oldDate | | ||
newDate := aMessage date asDate. | ||
oldDate := self lastMessageDate asDate. | ||
(newDate > oldDate) ifTrue: [ | ||
aMessage isFirstMessageOfDay: true. | ||
self lastMessage isLastMessageOfDay: true. | ||
]. | ||
self messageIds ifEmpty: [aMessage isFirstMessageOfDay: false]. | ||
self messageIds addFirst: aMessage id. | ||
self addMessage: aMessage. | ||
self triggerEvent: #newMessage with: aMessage. |
9 changes: 8 additions & 1 deletion
9
packages/TelegramClient-Core.package/TCCChat.class/instance/addOldestMessage..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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
adding | ||
addOldestMessage: aMessage | ||
|
||
self messages add: aMessage. | ||
| newDate oldDate | | ||
newDate := aMessage date asDate. | ||
oldDate := self oldestLoadedMessageDate asDate. | ||
(newDate < oldDate) ifTrue: [ | ||
self oldestLoadedMessage isFirstMessageOfDay: true. | ||
aMessage isLastMessageOfDay: true]. | ||
self messageIds add: aMessage id. | ||
self addMessage: aMessage. | ||
self triggerEvent: #loadedMessage with: aMessage. |
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
9 changes: 9 additions & 0 deletions
9
packages/TelegramClient-Core.package/TCCChat.class/instance/fulfillMessageRequest..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,9 @@ | ||
loading | ||
fulfillMessageRequest: aMessageId | ||
|
||
| fulfilledMessageRequests | | ||
|
||
fulfilledMessageRequests := self requestedMessages select: [:req | req messageId = aMessageId]. | ||
fulfilledMessageRequests do: [:messageRequest | messageRequest completeRequest.]. | ||
|
||
self requestedMessages removeAll: fulfilledMessageRequests. |
10 changes: 10 additions & 0 deletions
10
packages/TelegramClient-Core.package/TCCChat.class/instance/getMessageById..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,10 @@ | ||
accessing | ||
getMessageById: aNumber | ||
|
||
^ (self messageDictionary at: aNumber ifAbsent: [ | ||
self messageDictionary at: aNumber put: Promise new. | ||
self requestMessage: aNumber. | ||
self messageDictionary at: aNumber. | ||
]) | ||
wait; | ||
value |
8 changes: 8 additions & 0 deletions
8
packages/TelegramClient-Core.package/TCCChat.class/instance/handleMessageRequest..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,8 @@ | ||
controlling | ||
handleMessageRequest: aMessageRequest | ||
|
||
(self hasMessage: (aMessageRequest messageId)) ifTrue: | ||
[aMessageRequest completeRequest.] | ||
ifFalse: | ||
[self requestedMessages add: aMessageRequest. | ||
self loadChatHistory.]. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/hasMessage..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 @@ | ||
controlling | ||
hasMessage: aMessageId | ||
|
||
^ (self messageIds occurrencesOf: aMessageId) ~= 0 |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/hasPhoto.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 | ||
hasPhoto | ||
|
||
^ self photoId isNil not |
4 changes: 4 additions & 0 deletions
4
...s/TelegramClient-Core.package/TCCChat.class/instance/increaseNumberOfRequestedMessages.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 @@ | ||
loading | ||
increaseNumberOfRequestedMessages | ||
|
||
self numberOfRequestedMessages: self numberOfRequestedMessages + self class defaultMessageLimit. |
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/TCCChat.class/instance/isPinned..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 | ||
isPinned: aBoolean | ||
|
||
isPinned := aBoolean |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/isPinned.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 | ||
isPinned | ||
|
||
^ isPinned |
4 changes: 0 additions & 4 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage..st
This file was deleted.
Oops, something went wrong.
5 changes: 4 additions & 1 deletion
5
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessage.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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
accessing | ||
lastMessage | ||
|
||
^ lastMessage | ||
^ self messages | ||
ifEmpty: [ TCCNotLoadedMessage new | ||
date: self class defaultLastMessageDate] | ||
ifNotEmpty: [ self messages first ] |
6 changes: 6 additions & 0 deletions
6
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageDate.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 @@ | ||
accessing | ||
lastMessageDate | ||
|
||
"Date of the latest received message." | ||
|
||
^ self lastMessage date |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageSenderId..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 | ||
lastMessageSenderId: aNumber | ||
|
||
lastMessageSenderId := aNumber |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageSenderId.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 | ||
lastMessageSenderId | ||
|
||
^ lastMessageSenderId |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageSenderName..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 | ||
lastMessageSenderName: aString | ||
|
||
lastMessageSenderName := aString. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageSenderName.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 | ||
lastMessageSenderName | ||
|
||
^ lastMessageSenderName |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageText..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 | ||
lastMessageText: aString | ||
|
||
lastMessageText := aString. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/lastMessageText.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 | ||
lastMessageText | ||
|
||
^ lastMessageText |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/messageDictionary..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 | ||
messageDictionary: aDictionary | ||
|
||
messageDictionary := aDictionary |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/messageDictionary.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 | ||
messageDictionary | ||
|
||
^ messageDictionary |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/messageIds..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 | ||
messageIds: aCollection | ||
|
||
messageIds := aCollection |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/messageIds.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 | ||
messageIds | ||
|
||
^ messageIds |
4 changes: 0 additions & 4 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/messages..st
This file was deleted.
Oops, something went wrong.
6 changes: 5 additions & 1 deletion
6
packages/TelegramClient-Core.package/TCCChat.class/instance/messages.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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
accessing | ||
messages | ||
|
||
^ messages | ||
^ self messageIds collect: [:aNumber | | ||
(self messageDictionary at: aNumber) | ||
wait; | ||
value | ||
] |
Oops, something went wrong.