Skip to content

Commit

Permalink
trim account server properties once
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichAltheide committed Nov 6, 2023
1 parent e604693 commit b600282
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Monal/Classes/DataLayerMigrations.m
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,12 @@ FOREIGN KEY('account_id') REFERENCES 'account'('account_id') ON DELETE CASCADE\
[self updateDB:db withDataLayer:dataLayer toVersion:6.008 withBlock:^{
}];

[self updateDB:db withDataLayer:dataLayer toVersion:6.009 withBlock:^{
[db executeNonQuery:@"UPDATE account SET server=TRIM(server);"];
[db executeNonQuery:@"UPDATE account SET username=TRIM(username);"];
[db executeNonQuery:@"UPDATE account SET domain=TRIM(domain);"];
}];

//check if device id changed and invalidate state, if so
//but do so only for non-sandbox (e.g. non-development) installs
if(![[HelperTools defaultsDB] boolForKey:@"isSandboxAPNS"])
Expand Down

0 comments on commit b600282

Please sign in to comment.