mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 08:52:20 +00:00
Only notify when address is in contacts
This commit is contained in:
@@ -354,6 +354,19 @@ public class RecipientDatabase extends Database {
|
||||
return results;
|
||||
}
|
||||
|
||||
public List<Address> getSystemContacts() {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
List<Address> results = new LinkedList<>();
|
||||
|
||||
try (Cursor cursor = db.query(TABLE_NAME, new String[] {ADDRESS}, SYSTEM_DISPLAY_NAME + " IS NOT NULL AND " + SYSTEM_DISPLAY_NAME + " != \"\"", null, null, null, null)) {
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
results.add(Address.fromSerialized(cursor.getString(0)));
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
// XXX This shouldn't be here, and is just a temporary workaround
|
||||
public RegisteredState isRegistered(@NonNull Address address) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
|
||||
Reference in New Issue
Block a user