mirror of
https://github.com/wassname/talk.git
synced 2026-08-04 13:23:35 +08:00
27 lines
761 B
JavaScript
27 lines
761 B
JavaScript
import IgnoreUserAction from './containers/IgnoreUserAction';
|
|
import IgnoreUserConfirmation from './containers/IgnoreUserConfirmation';
|
|
import translations from './translations.yml';
|
|
import update from 'immutability-helper';
|
|
|
|
export default {
|
|
mutations: {
|
|
IgnoreUser: ({variables}) => ({
|
|
updateQueries: {
|
|
CoralEmbedStream_Embed: (previousData) => {
|
|
const ignoredUserId = variables.id;
|
|
const updated = update(previousData, {me: {ignoredUsers: {$push: [{
|
|
id: ignoredUserId,
|
|
__typename: 'User',
|
|
}]}}});
|
|
return updated;
|
|
}
|
|
}
|
|
}),
|
|
},
|
|
slots: {
|
|
authorMenuActions: [IgnoreUserAction],
|
|
ignoreUserConfirmation: [IgnoreUserConfirmation]
|
|
},
|
|
translations
|
|
};
|