do quick start with HT-SHA-256-NONE part 3

This commit is contained in:
Arne 2022-11-03 20:48:46 +01:00
parent ae38564801
commit 3d8ca2c8e3
2 changed files with 9 additions and 2 deletions

View file

@ -115,6 +115,8 @@ public class Account extends AbstractEntity implements AvatarService.Avatarable
private String presenceStatusMessage;
private String pinnedMechanism;
private String pinnedChannelBinding;
private String fastMechanism;
private String fastToken;
public Account(final Jid jid, final String password) {
this(

View file

@ -67,7 +67,7 @@ import eu.siacs.conversations.xmpp.mam.MamReference;
public class DatabaseBackend extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "history";
public static final int DATABASE_VERSION = 57; // = Conversations DATABASE_VERSION + 7
public static final int DATABASE_VERSION = 58; // = Conversations DATABASE_VERSION + 7
private static boolean requiresMessageIndexRebuild = false;
private static DatabaseBackend instance = null;
private static final List<String> DB_PRAGMAS = Collections.unmodifiableList(Arrays.asList(
@ -278,6 +278,8 @@ public class DatabaseBackend extends SQLiteOpenHelper {
+ Account.RESOURCE + " TEXT,"
+ Account.PINNED_MECHANISM + " TEXT,"
+ Account.PINNED_CHANNEL_BINDING + " TEXT,"
+ Account.FAST_MECHANISM + " TEXT,"
+ Account.FAST_TOKEN + " TEXT,"
+ Account.PORT + " NUMBER DEFAULT 5222)");
db.execSQL("create table " + Conversation.TABLENAME + " ("
+ Conversation.UUID + " TEXT PRIMARY KEY, " + Conversation.NAME
@ -679,7 +681,10 @@ public class DatabaseBackend extends SQLiteOpenHelper {
if (oldVersion < 57 && newVersion >= 57) {
db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + Account.PINNED_MECHANISM + " TEXT");
db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + Account.PINNED_CHANNEL_BINDING + " TEXT");
}
if (oldVersion < 51 && newVersion >= 51) {
db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + Account.FAST_MECHANISM + " TEXT");
db.execSQL("ALTER TABLE " + Account.TABLENAME + " ADD COLUMN " + Account.FAST_TOKEN + " TEXT");
}
}