Fixing messages and Improving remote messages from html.

This commit is contained in:
ruidajo 2022-06-09 18:07:22 -05:00
parent d2025d8aa9
commit fb00701e9e
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,4 @@
accessing
getRemoteMessagesFromHtml
self messages: (self collectRawTweetsUpToPage: 1).
^ self messages
^ messages := self collectRawTweetsUpToPage: 1

View File

@ -1,7 +1,12 @@
accessing
messages
messages ifNil: [ ^ messages := TweetsCollection new ].
messages ifNil: [ messages := TweetsCollection new ].
messages ifEmpty: [ self getRemoteMessagesFromHtml ].
self config isEmpty ifTrue: [ ^ messages ].
[ config at: 'reportingPeriod' ]
onErrorDo: [ self config
at: 'reportingPeriod'
put: (Timespan
starting: (messages oldest created asDateAndTime)
ending: (messages newest created asDateAndTime + 1 minute)) ].
^ messages select: [ :message | message created between: self reportingPeriod start and: self reportingPeriod end ]