damus icon indicating copy to clipboard operation
damus copied to clipboard

Fix determine_is_request logic

Open hanton opened this issue 2 years ago • 1 comments

Based on description in DirectMessagesView.swift:

Text("DMs", comment: "Picker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message.")
    .tag(DMType.friend)
Text("Requests", comment: "Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.")
    .tag(DMType.rando)

The return value of determine_is_request should be: true: if all of the events(messages) are coming from the user(our_pubkey) false: if one of the events is not coming from the user

hanton avatar Feb 08 '23 03:02 hanton

This doesn't seem right. The goal of this was if any of the DMs is ours then we've replied, so it is not a request. If we have not replied then it is a request.

jb55 avatar Feb 08 '23 17:02 jb55

You are right. Thanks for the clarification. The issue I'm trying to solve is https://github.com/damus-io/damus/issues/556.

Will close this PR and dig into it more.

hanton avatar Feb 08 '23 23:02 hanton