From 21b4f432c48139dd0efbeedd72fd15e9704f0c7f Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 3 May 2022 08:32:10 -0500 Subject: [PATCH] Temporal bugfix to deal with Twitter changes in user id. --- .../NitterUser.class/instance/tweets.st | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/tweets.st b/Socialmetrica.package/NitterUser.class/instance/tweets.st index 304500b..e3144f5 100644 --- a/Socialmetrica.package/NitterUser.class/instance/tweets.st +++ b/Socialmetrica.package/NitterUser.class/instance/tweets.st @@ -1,6 +1,15 @@ accessing tweets + | subcollection | 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 ] ] + ]. ^ TweetsCollection new - messages: (self messages select: [ :each | each authorId = self id ]); + messages: subcollection; yourself \ No newline at end of file