Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85823360
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/modules/config_declaration.js b/src/modules/config_declaration.js
index 38619f4fb6..0d2f00e38e 100644
--- a/src/modules/config_declaration.js
+++ b/src/modules/config_declaration.js
@@ -1,45 +1,47 @@
-import { useMergedConfigStore } from 'src/stores/merged_config.js'
+import { storage } from 'src/lib/storage.js'
export const CONFIG_MIGRATION = 1
import { v4 as uuidv4 } from 'uuid'
// for future use
/*
const simpleDeclaration = {
store: 'server-side',
migrationFlag: 'configMigration',
migration(serverside, rootState) {
serverside.setSimplePrefAndSave({ path: field, value: rootState.config[oldField ?? field] })
}
}
*/
export const declarations = [
{
field: 'muteFilters',
store: 'server-side',
migrationFlag: 'configMigration',
migrationNum: 1,
description: 'Mute filters, wordfilter/regexp/etc',
valueType: 'complex',
- migration(serverside, rootState) {
- useMergedConfigStore().mergedConfig.muteWords.forEach((word, order) => {
+ migration: async (serverside, rootState) => {
+ const vuexState = (await storage.getItem('vuex-lz')) ?? {}
+
+ vuexState.config?.muteWords?.forEach((word, order) => {
const uniqueId = uuidv4()
serverside.setPreference({
path: 'simple.muteFilters.' + uniqueId,
value: {
type: 'word',
value: word,
name: word,
enabled: true,
expires: null,
hide: false,
order,
},
})
})
},
},
]
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Oct 29, 4:42 AM (4 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1797550
Default Alt Text
(1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline