mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-06 13:59:49 +02:00
Fetch all users' messages in PullNotificationWorker. Update the access token in database instead of inserting an account in AccessTokenAuthenticator to hopefully fix the problem that subscriptions database is cleared implicitly.
This commit is contained in:
@@ -13,6 +13,9 @@ public interface AccountDao {
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
void insert(Account account);
|
||||
|
||||
@Query("SELECT * FROM accounts")
|
||||
List<Account> getAllAccounts();
|
||||
|
||||
@Query("SELECT * FROM accounts WHERE is_current_user = 0")
|
||||
List<Account> getAllNonCurrentAccounts();
|
||||
|
||||
@@ -43,4 +46,7 @@ public interface AccountDao {
|
||||
|
||||
@Query("UPDATE accounts SET is_current_user = 1 WHERE username = :username")
|
||||
void markAccountCurrent(String username);
|
||||
|
||||
@Query("UPDATE accounts SET access_token = :accessToken WHERE username = :username")
|
||||
void changeAccessToken(String username, String accessToken);
|
||||
}
|
||||
|
Reference in New Issue
Block a user