fix: marshal dismissed contact request state properly (#3482)

This commit is contained in:
Mikhail Rogachev 2023-05-15 11:29:33 +04:00 committed by GitHub
parent 39f486a47a
commit d55adaf3a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -426,6 +426,8 @@ func (c *Contact) MarshalJSON() ([]byte, error) {
if c.mutual() { if c.mutual() {
item.ContactRequestState = ContactRequestStateMutual item.ContactRequestState = ContactRequestStateMutual
} else if c.dismissed() {
item.ContactRequestState = ContactRequestStateDismissed
} else if c.added() { } else if c.added() {
item.ContactRequestState = ContactRequestStateSent item.ContactRequestState = ContactRequestStateSent
} else if c.hasAddedUs() { } else if c.hasAddedUs() {