]> cat aescling's git repositories - mastodon.git/commit
Feature conversations muting (#3017)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 15 May 2017 01:04:13 +0000 (03:04 +0200)
committerGitHub <noreply@github.com>
Mon, 15 May 2017 01:04:13 +0000 (03:04 +0200)
commitd0dd9eb5b5d2c0d80a756a6e432b5d502ed0e0fc
tree74845d93fd7bf5d85db9489b2f2c23e5989314e0
parenta588358f41f36b2df1dcc4bb2c3df6c54ed52f88
Feature conversations muting (#3017)

* Add <ostatus:conversation /> tag to Atom input/output

Only uses ref attribute (not href) because href would be
the alternate link that's always included also.

Creates new conversation for every non-reply status. Carries
over conversation for every reply. Keeps remote URIs verbatim,
generates local URIs on the fly like the rest of them.

* Conversation muting - prevents notifications that reference a conversation
(including replies, favourites, reblogs) from being created. API endpoints
/api/v1/statuses/:id/mute and /api/v1/statuses/:id/unmute

Currently no way to tell when a status/conversation is muted, so the web UI
only has a "disable notifications" button, doesn't work as a toggle

* Display "Dismiss notifications" on all statuses in notifications column, not just own

* Add "muted" as a boolean attribute on statuses JSON

For now always false on contained reblogs, since it's only relevant for
statuses returned from the notifications endpoint, which are not nested

Remove "Disable notifications" from detailed status view, since it's
only relevant in the notifications column

* Up max class length

* Remove pending test for conversation mute

* Add tests, clean up

* Rename to "mute conversation" and "unmute conversation"

* Raise validation error when trying to mute/unmute status without conversation
52 files changed:
app/controllers/api/v1/statuses_controller.rb
app/controllers/api_controller.rb
app/javascript/mastodon/actions/statuses.js
app/javascript/mastodon/components/status_action_bar.js
app/javascript/mastodon/containers/status_container.js
app/javascript/mastodon/features/notifications/components/notification.js
app/javascript/mastodon/features/status/components/action_bar.js
app/javascript/mastodon/features/status/index.js
app/javascript/mastodon/locales/ar.json
app/javascript/mastodon/locales/bg.json
app/javascript/mastodon/locales/de.json
app/javascript/mastodon/locales/defaultMessages.json
app/javascript/mastodon/locales/en.json
app/javascript/mastodon/locales/eo.json
app/javascript/mastodon/locales/es.json
app/javascript/mastodon/locales/fa.json
app/javascript/mastodon/locales/fi.json
app/javascript/mastodon/locales/fr.json
app/javascript/mastodon/locales/he.json
app/javascript/mastodon/locales/hr.json
app/javascript/mastodon/locales/hu.json
app/javascript/mastodon/locales/id.json
app/javascript/mastodon/locales/io.json
app/javascript/mastodon/locales/it.json
app/javascript/mastodon/locales/ja.json
app/javascript/mastodon/locales/nl.json
app/javascript/mastodon/locales/no.json
app/javascript/mastodon/locales/oc.json
app/javascript/mastodon/locales/pl.json
app/javascript/mastodon/locales/pt-BR.json
app/javascript/mastodon/locales/pt.json
app/javascript/mastodon/locales/ru.json
app/javascript/mastodon/locales/tr.json
app/javascript/mastodon/locales/uk.json
app/javascript/mastodon/locales/zh-CN.json
app/javascript/mastodon/locales/zh-HK.json
app/javascript/mastodon/reducers/statuses.js
app/models/account.rb
app/models/conversation.rb
app/models/conversation_mute.rb [new file with mode: 0644]
app/models/status.rb
app/services/notify_service.rb
app/views/api/v1/statuses/show.rabl
config/routes.rb
db/migrate/20170301222600_create_mutes.rb
db/migrate/20170508230434_create_conversation_mutes.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/api/v1/statuses_controller_spec.rb
spec/fabricators/conversation_mute_fabricator.rb [new file with mode: 0644]
spec/models/conversation_mute_spec.rb [new file with mode: 0644]
spec/models/status_spec.rb
spec/services/notify_service_spec.rb