31 lines
1.2 KiB
Smalltalk
31 lines
1.2 KiB
Smalltalk
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'
|
|
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 = 'IBetancourtCol'
|
|
ifTrue: [
|
|
subcollection := self messages
|
|
select: [ :each | (each authorId = '1517487571135344643') or: [ each authorId = self id ] ]
|
|
].
|
|
self userName = 'sergio_fajardo'
|
|
ifTrue: [
|
|
subcollection := self messages
|
|
select: [ :each | (each authorId = '1509644668300058633') or: [ each authorId = self id ] ]
|
|
].
|
|
(self userName ~= 'FranciaMarquezM' and: [ self userName ~= 'sandralajas' ])
|
|
ifTrue: [ (self userName ~= 'IBetancourtCol' and: [ self userName ~= 'sergio_fajardo' ]) ifTrue: [ subcollection := self messages select: [ :each | each authorId = self id ]]
|
|
].
|
|
^ TweetsCollection new
|
|
messages: subcollection;
|
|
yourself |