3
0

Unlist messaging app on upgrade

This commit is contained in:
Denis Arh
2021-03-29 07:45:10 +02:00
parent 5d8301f4b5
commit 34e835ed3c
+8 -1
View File
@@ -16,9 +16,16 @@ func migrateApplications(ctx context.Context, s store.Storer) error {
}
return set.Walk(func(app *types.Application) (err error) {
// Disable messaging app but only if it was not updated after 21.3 release date
// Disable and unlist messaging app
// but only if it was not updated after 21.3 release date
if app.Unify.Url == "/messaging" && (app.UpdatedAt == nil || app.UpdatedAt.Before(rd)) {
if app.Unify == nil {
app.Unify = &types.ApplicationUnify{}
}
app.Unify.Listed = false
app.Enabled = false
err = store.UpdateApplication(ctx, s, app)
}