Socialmetrica/Socialmetrica.package/NitterUser.class/instance/getLocalMessages.st

14 lines
506 B
Smalltalk
Raw Normal View History

accessing
getLocalMessages
"TO DO! This method should return messages from the local database"
2022-04-14 22:40:41 +00:00
| allTweets myTweets tweetsWithAntecesor |
TweetsCollection storeDB.
allTweets := Tweet storedInstances asOrderedCollection.
allTweets ifNil: [ ^ nil ].
myTweets := TweetsCollection new.
2022-04-14 22:40:41 +00:00
tweetsWithAntecesor := allTweets select: [ :each | each timelines isNotEmpty and: [ each timelines keys first = self userName ]].
myTweets messages: tweetsWithAntecesor.
self messages: myTweets.
^ self messages