mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-27 12:29:07 +00:00
Correctly store destination SMS state.
This commit is contained in:
@@ -109,7 +109,7 @@ public class Directory {
|
||||
values.put(TOKEN, token.getToken());
|
||||
values.put(RELAY, token.getRelay());
|
||||
values.put(REGISTERED, active ? 1 : 0);
|
||||
values.put(SUPPORTS_SMS, token.isSupportsSms());
|
||||
values.put(SUPPORTS_SMS, token.isSupportsSms() ? 1 : 0);
|
||||
values.put(TIMESTAMP, System.currentTimeMillis());
|
||||
db.replace(TABLE_NAME, null, values);
|
||||
}
|
||||
@@ -127,6 +127,7 @@ public class Directory {
|
||||
values.put(REGISTERED, 1);
|
||||
values.put(TIMESTAMP, timestamp);
|
||||
values.put(RELAY, token.getRelay());
|
||||
values.put(SUPPORTS_SMS, token.isSupportsSms() ? 1 : 0);
|
||||
db.replace(TABLE_NAME, null, values);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ public class PushDestination {
|
||||
return relay;
|
||||
}
|
||||
|
||||
public static PushDestination getInstance(Context context,
|
||||
PushServiceSocket.PushCredentials credentials,
|
||||
String destinationNumber)
|
||||
public static PushDestination create(Context context,
|
||||
PushServiceSocket.PushCredentials credentials,
|
||||
String destinationNumber)
|
||||
{
|
||||
String e164destination = PhoneNumberFormatter.formatNumber(destinationNumber, credentials.getLocalNumber(context));
|
||||
String relay = Directory.getInstance(context).getRelay(e164destination);
|
||||
|
||||
Reference in New Issue
Block a user