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

Don't add my own handle to a reply (#1254) #1256

Merged
merged 3 commits into from
Mar 19, 2024
Merged

Conversation

zeitschlag
Copy link
Contributor

@zeitschlag zeitschlag commented Mar 12, 2024

Fixes #1254. This was a nice little bug. This caused it:

let mentions = status.mentions ?? []
    .filter { author?.id != $0.id }
// ...

which can be read as

let mentions = status.mentions ?? [].filter { author?.id != $0.id }

So, in case there're no mentions, we filter an empty list to not include our own handle.
The fix makes the optional mentions required, as according to the docs, it's not even optional.

On another note: We should look into what it takes to remove Status-persistence.

This is a left over from the status-refactoring. The Core Data-persistence-stuff for Status needed that, but as we don't use that any more say byebye
@zeitschlag zeitschlag changed the title 1254 own handle in reply Don't add my own handle to a reply (#1254) Mar 12, 2024
@zeitschlag zeitschlag marked this pull request as ready for review March 12, 2024 07:55
@zeitschlag zeitschlag requested a review from kimar March 12, 2024 07:55
@zeitschlag zeitschlag requested review from kimar and removed request for kimar March 19, 2024 09:10
Copy link
Contributor

@kimar kimar left a comment

Choose a reason for hiding this comment

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

👍

@kimar kimar merged commit 13cc2bd into develop Mar 19, 2024
2 checks passed
@kimar kimar deleted the 1254-own-handle-in-reply branch March 19, 2024 09:28
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.

My own handle is added to the reply
2 participants