Skip to content

[Notifications] Make close/dismiss button in the Activity tab match server's logic #5922

Closed

Description

@SamuAlfageme

I just checked how's the implementation to close notifications is in the client. While doing this on server:

... is the equivalent of removing the notification / dismiss forever:

curl 'https://<server>/ocs/v2.php/apps/notifications/api/v1/notifications/5?format=json' \
  -X DELETE \
  [...]
  -H 'OCS-APIREQUEST: true' \

Closing it on the client's Activity tab:

Does not cause any effects on the server (see https://github.com/owncloud/client/blob/master/src/gui/notificationwidget.cpp#L100-L108) ; meaning on next client startup, those notifications will be displayed again.

I think these should be adjusted to match the ❌ (close) logic in the server.

ref. https://github.com/owncloud/enterprise/issues/2178

Activity

  1. added this to the 2.4.0 milestone on Jul 25, 2017
  2. guruz commented on Jul 26, 2017

    @guruz
    Contributor

    They even re-appear while the client is running sometimes.

    CC @dragotin

  3. guruz commented on Jul 28, 2017

    @guruz
    Contributor

    The code was easy but it does not work :-(

    We expect:
    // the ocs API returns stat code 100 if it succeeded.

    But calling DELETE on the notification as in returns a HTTP 200
    https://github.com/owncloud/notifications/blob/master/docs/ocs-endpoint-v1.md#deleting-a-notification-for-a-user

    I'm not sure I understand this, why is 100 expected?
    #define OCS_SUCCESS_STATUS_CODE 100
    HTTP 100 is "Continue", it's not a confirmation code.

    So this is a server bug that we could work around by just accepting 200, but...

    EDIT: but according to https://github.com/owncloud/notifications/blob/e0fb0e89e59799e80dcf57cc44aaf5eed0abeb19/tests/Unit/Controller/EndpointControllerTest.php#L337 the 100 should have been sent?

  4. added
    ReadyToTest
    on Aug 4, 2017
  5. SamuAlfageme commented on Aug 8, 2017

    @SamuAlfageme
    ContributorAuthor

    👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Design & UXEnhancementReadyToTestblue-ticket

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions