Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIS-526] Expose thread participants as a set of ChartUsers instead of a set of UserIds #998

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

dmigach
Copy link
Contributor

@dmigach dmigach commented Apr 19, 2021

Update the way we expose thread participants. Rather than UserId we should expose them as @CoreDataLazy set of _ChatUser.
Also a part of this task was to make sure we serialise and save participants correctly, this seems to be fine. The only thing I noticed is that backend doesn't include imageURLs for participants into MessagePayload

@dmigach dmigach requested a review from VojtaStavik April 19, 2021 11:49
@codecov
Copy link

codecov bot commented Apr 19, 2021

Codecov Report

Merging #998 (4055b58) into main (f9d8246) will increase coverage by 0.16%.
The diff coverage is 73.33%.

❗ Current head 4055b58 differs from pull request most recent head 18c9a2e. Consider uploading reports for the commit 18c9a2e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #998      +/-   ##
==========================================
+ Coverage   89.48%   89.64%   +0.16%     
==========================================
  Files         210      210              
  Lines        8758     8771      +13     
==========================================
+ Hits         7837     7863      +26     
+ Misses        921      908      -13     
Flag Coverage Δ
llc-tests 89.47% <73.33%> (-0.01%) ⬇️
llc-tests-ios12 86.14% <73.33%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Sources/StreamChat/Database/DTOs/MessageDTO.swift 94.39% <42.85%> (-1.05%) ⬇️
Sources/StreamChat/Models/Message.swift 90.00% <100.00%> (+1.62%) ⬆️
...ources/StreamChat/Database/DatabaseContainer.swift 96.89% <0.00%> (+0.77%) ⬆️
.../Utils/InternetConnection/InternetConnection.swift 54.95% <0.00%> (+0.90%) ⬆️
...urces/StreamChat/Database/DTOs/AttachmentDTO.swift 68.44% <0.00%> (+0.97%) ⬆️
...ocketClient/Engine/StarscreamWebSocketEngine.swift 30.95% <0.00%> (+30.95%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9d8246...18c9a2e. Read the comment docs.

@dmigach dmigach force-pushed the CIS-526-thread-participants-improvements branch 2 times, most recently from 670b239 to 4055b58 Compare April 20, 2021 10:30
@dmigach dmigach requested a review from VojtaStavik April 21, 2021 09:42
Copy link
Contributor

@VojtaStavik VojtaStavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about having the lastThreadParticipant convenience variable on the model directly. Maybe move to the file where it's needed in the UI SDK? Even the isPinned there was probably a mistake :/

Once fixed I think we're good to merge this 👍 Also, please add CHANGELOG entry for this change ;-)

Sources/StreamChat/Models/Message.swift Outdated Show resolved Hide resolved
…UserId

Use last active participant avatar for thread info view
@dmigach dmigach force-pushed the CIS-526-thread-participants-improvements branch from 4055b58 to 18c9a2e Compare April 22, 2021 09:23
@dmigach dmigach merged commit eb8236e into main Apr 22, 2021
@dmigach dmigach deleted the CIS-526-thread-participants-improvements branch April 22, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants