Dealing with changes in user Id.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-05-04 22:43:23 -05:00
parent 459502cd5f
commit c32a351932
1 changed files with 7 additions and 2 deletions

View File

@ -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