damus icon indicating copy to clipboard operation
damus copied to clipboard

Fix empty our_pubkey in DirectMessagesModel

Open hanton opened this issue 2 years ago • 1 comments

The PR is for solving https://github.com/damus-io/damus/issues/556

Root cause:

  1. dms is created with empty pub key in HomeModel
  2. After that, its pub key is never updated even when damus_state is updated in ContentView
  3. The empty pub key of DirectMessagesModel is used to init a new DirectMessageModel, so the pub key of newly created DirectMessageModel is also empty
  4. As a result, determine_is_request in DirectMessageModel will always return true because our_pubkey is empty.
  5. It causes newly created conversations show in the Requests list, instead of DMs list

Input is welcome.

hanton avatar Feb 09 '23 00:02 hanton

ohhh

jb55 avatar Feb 10 '23 18:02 jb55

sorry will get back to this soon

jb55 avatar Mar 05 '23 21:03 jb55