From c32a351932b5f3b179cb64c84c3099c9af4fcdae Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Wed, 4 May 2022 22:43:23 -0500 Subject: [PATCH] Dealing with changes in user Id. --- .../NitterUser.class/instance/tweets.st | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/tweets.st b/Socialmetrica.package/NitterUser.class/instance/tweets.st index e3144f5..5990746 100644 --- a/Socialmetrica.package/NitterUser.class/instance/tweets.st +++ b/Socialmetrica.package/NitterUser.class/instance/tweets.st @@ -4,12 +4,17 @@ tweets self messages ifEmpty: [ self getMessages ]. "TO DO: It seems that Twitter changes the user id, which we thought was unchangeable. This deals with the detected changes so far." self userName = 'FranciaMarquezM' - ifFalse: [ - subcollection := self messages select: [ :each | each authorId = self id ] ] ifTrue: [ subcollection := self messages select: [ :each | (each authorId = '1510420950801698826') or: [ each authorId = self id ] ] ]. + self userName = 'sandralajas' + ifTrue: [ + subcollection := self messages + select: [ :each | (each authorId = '1502504562984374276') or: [ each authorId = self id ] ] + ]. + (self userName ~= 'FranciaMarquezM' or: [ self userName = 'sandralajas' ]) + ifFalse: [ subcollection := self messages select: [ :each | each authorId = self id ] ]. ^ TweetsCollection new messages: subcollection; yourself \ No newline at end of file