mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 14:27:44 +00:00
update formation timestamp when group is rejoined after being left
This commit is contained in:
@@ -308,6 +308,13 @@ public class GroupDatabase extends Database implements LokiOpenGroupDatabaseProt
|
||||
databaseHelper.getWritableDatabase().update(TABLE_NAME, contents, GROUP_ID + " = ?", new String[] {groupId});
|
||||
}
|
||||
|
||||
public void updateFormationTimestamp(String groupId, Long formationTimestamp) {
|
||||
ContentValues contents = new ContentValues();
|
||||
contents.put(TIMESTAMP, formationTimestamp);
|
||||
|
||||
databaseHelper.getWritableDatabase().update(TABLE_NAME, contents, GROUP_ID + " = ?", new String[] {groupId});
|
||||
}
|
||||
|
||||
public void removeMember(String groupId, Address source) {
|
||||
List<Address> currentMembers = getCurrentMembers(groupId, false);
|
||||
currentMembers.remove(source);
|
||||
|
@@ -428,6 +428,10 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseFactory.getLokiAPIDatabase(context).removeAllClosedGroupEncryptionKeyPairs(groupPublicKey)
|
||||
}
|
||||
|
||||
override fun updateFormationTimestamp(groupID: String, formationTimestamp: Long) {
|
||||
DatabaseFactory.getGroupDatabase(context).updateFormationTimestamp(groupID, formationTimestamp)
|
||||
}
|
||||
|
||||
override fun getAllV2OpenGroups(): Map<Long, OpenGroupV2> {
|
||||
return DatabaseFactory.getLokiThreadDatabase(context).getAllV2OpenGroups()
|
||||
}
|
||||
|
Reference in New Issue
Block a user