From 3d7cc8110ce06cec506537e769da2292b6cf084f Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 9 Jun 2022 15:12:36 -0500 Subject: [PATCH] Modifying messages decalration for twitter and nitter user. --- .../NitterUser.class/instance/getRemoteMessagesFromHtml.st | 3 ++- .../NitterUser.class/instance/messages.st | 7 +++++++ .../TwitterUser.class/instance/messages.st | 5 ++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 Socialmetrica.package/NitterUser.class/instance/messages.st diff --git a/Socialmetrica.package/NitterUser.class/instance/getRemoteMessagesFromHtml.st b/Socialmetrica.package/NitterUser.class/instance/getRemoteMessagesFromHtml.st index 0936c1d..bdad00c 100644 --- a/Socialmetrica.package/NitterUser.class/instance/getRemoteMessagesFromHtml.st +++ b/Socialmetrica.package/NitterUser.class/instance/getRemoteMessagesFromHtml.st @@ -1,4 +1,5 @@ accessing getRemoteMessagesFromHtml - ^ self messages: (self collectRawTweetsUpToPage: 1) \ No newline at end of file + self messages: (self collectRawTweetsUpToPage: 1). + ^ self messages \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/messages.st b/Socialmetrica.package/NitterUser.class/instance/messages.st new file mode 100644 index 0000000..c2a442b --- /dev/null +++ b/Socialmetrica.package/NitterUser.class/instance/messages.st @@ -0,0 +1,7 @@ +accessing +messages + + messages ifNil: [ ^ messages := TweetsCollection new ]. + messages ifEmpty: [ self getRemoteMessagesFromHtml ]. + self config isEmpty ifTrue: [ ^ messages ]. + ^ messages select: [ :message | message created between: self reportingPeriod start and: self reportingPeriod end ] \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/messages.st b/Socialmetrica.package/TwitterUser.class/instance/messages.st index ecaeff9..9137661 100644 --- a/Socialmetrica.package/TwitterUser.class/instance/messages.st +++ b/Socialmetrica.package/TwitterUser.class/instance/messages.st @@ -1,5 +1,4 @@ accessing messages - messages ifNil: [ ^ messages := TweetsCollection new ]. - self config isEmpty ifTrue: [ ^ messages ]. - ^ messages select: [ :message | message created between: self reportingPeriod start and: self reportingPeriod end ] \ No newline at end of file + + ^ self subclassResponsibility \ No newline at end of file