Bugfix: Tweets and avatar

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-05-14 17:45:58 -05:00
parent 49f44385d7
commit c16f109067
2 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,8 @@ avatarPicture
| response tempImage |
response := ZnClient new url: (self profileImageUrl); get; response.
response contentType = ZnMimeType imageJpeg
ifTrue: [ ^ (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
ifTrue: [ tempImage := (PluginBasedJPEGReadWriter gtFromBuffer: response contents) asElement ].
response contentType = ZnMimeType imagePng
ifTrue: [ ^ (PNGReadWriter gtFromBuffer: response contents) asElement ].
ifTrue: [ tempImage := (PNGReadWriter gtFromBuffer: response contents) asElement ].
tempImage on: Error do: [ ^ GtABContact new avatar ].
^ tempImage value asElement .

View File

@ -13,7 +13,7 @@ tweets
subcollection := self messages
select: [ :each | (each authorId = '1502504562984374276') or: [ each authorId = self id ] ]
].
(self userName ~= 'FranciaMarquezM' or: [ self userName = 'sandralajas' ])
(self userName ~= 'FranciaMarquezM' or: [ self userName ~= 'sandralajas' ])
ifFalse: [ subcollection := self messages select: [ :each | each authorId = self id ] ].
^ TweetsCollection new
messages: subcollection;