mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-25 07:36:18 +00:00
Temporary fix for Signal contact displaying as SMS for N seconds
The whole recipient pipeline needs to be changed more subsantially, particularly given the way directory discovery works with it. This will temporarily solve the problem though.
This commit is contained in:
@@ -345,6 +345,16 @@ public class RecipientDatabase extends Database {
|
||||
return results;
|
||||
}
|
||||
|
||||
// XXX This shouldn't be here, and is just a temporary workaround
|
||||
public RegisteredState isRegistered(@NonNull Address address) {
|
||||
SQLiteDatabase db = databaseHelper.getReadableDatabase();
|
||||
|
||||
try (Cursor cursor = db.query(TABLE_NAME, new String[] {REGISTERED}, ADDRESS + " = ?", new String[] {address.serialize()}, null, null, null)) {
|
||||
if (cursor != null && cursor.moveToFirst()) return RegisteredState.fromId(cursor.getInt(0));
|
||||
else return RegisteredState.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateOrInsert(Address address, ContentValues contentValues) {
|
||||
SQLiteDatabase database = databaseHelper.getWritableDatabase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user