almindor / harbour-jTox

Sailfish OS native tox implementation for Jolla
GNU General Public License v3.0
12 stars 4 forks source link

Change friend request storage #23

Closed almindor closed 7 years ago

almindor commented 7 years ago

Friend requests are currently stored directly in QSettings without any "owner" identifier.

This causes an issue where changing a profile while an open friend-request is still present leads to getting that same request visible and acceptable from the new profile (although it won't work).

Friend requests should be stored in the SQLite DB alongside messages and wiped when a new profile is imported just as messages are.

NOTE: I think that toxcore currently gets into a funny state if a friend request was received but not accepted. It seems sending new ones will NOT deliver the request callback again which could lead to people who flipped profiles being unable to be added by the same person again. Further research is needed.