mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
chat: add update-metadata to metadata reducer
This commit is contained in:
parent
4637587afd
commit
88b34c2ba7
@ -6,6 +6,7 @@ export class MetadataReducer {
|
||||
if (data) {
|
||||
this.associations(data, state);
|
||||
this.add(data, state);
|
||||
this.update(data, state);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,4 +30,13 @@ export class MetadataReducer {
|
||||
state.associations = metadata;
|
||||
}
|
||||
}
|
||||
|
||||
update(json, state) {
|
||||
let data = _.get(json, 'update-metadata', false);
|
||||
if (data) {
|
||||
let metadata = state.associations;
|
||||
metadata.set(data["app-path"], data);
|
||||
state.associations = metadata;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user