Skip to content

Commit

Permalink
Treat send attempt unsuccessful when there is a message.
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed May 14, 2019
1 parent 7e920e3 commit ad4252c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/js/sharedialogshareelistview.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
$loading.removeClass('hidden');

this.model.sendNotificationForShare(shareType, shareWith, true).then(function(result) {
if (result.ocs.meta.status === 'ok') {
if (result.ocs.meta.message === null) {
OC.Notification.showTemporary(t('core', 'Email notification was sent!'));
$target.remove();
} else {
Expand Down
2 changes: 1 addition & 1 deletion core/js/tests/specs/sharedialogshareelistview.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('OC.Share.ShareDialogShareeListView', function () {
expect(notificationStub.called).toEqual(true);
notificationStub.restore();

deferred.resolve({ ocs: { meta: {status: 'ok' }}});
deferred.resolve({ ocs: { meta: {message: null }}});
expect(notifStub.calledOnce).toEqual(true);
notifStub.restore();

Expand Down

0 comments on commit ad4252c

Please sign in to comment.