Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
Solved url path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antunaalonso committed Apr 29, 2019
1 parent adf1021 commit 283762b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/scripts/NotificationManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ async function deleteNotification(userURI, reciver) {
var userInbox = userURI + "inbox/";
//List all user
var List = [];
List = await readAllNotification(userInbox);

List = await readAllNotification(userURI);
var newList = []

//UpdateList
Expand Down Expand Up @@ -43,6 +44,7 @@ async function writeNotification(receiverURI, user) {
var receiverInbox = receiverURI + "inbox/";
//List all user
var List = [];

List = await readAllNotification(receiverURI);

var existe = 0;
Expand Down Expand Up @@ -75,7 +77,7 @@ async function writeNotification(receiverURI, user) {
//Methor for constantly reading new Notifications from others chat
async function readAllNotification(receiverURI) {
//Read Notification file
var receiverInbox = receiverURI;
var receiverInbox = receiverURI + "inbox/";
var fileURL = receiverInbox + notAppend + ".ttl";

var file = await podUtils.readFile(fileURL, true);
Expand Down
2 changes: 1 addition & 1 deletion test/ChatTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('Notification Manager', function() {
});
it('createNotificationsTtl', async function() {
this.timeout(timeout);
assert.equal(await podUtils.readFile(credentials.base + "/inbox/SolidChatNot", true), null);
assert.equal(await podUtils.readFile(credentials.base + "/inbox/SolidChatNot.ttl", true), null);
assert.notEqual(await notiMa.readAllNotification(credentials.base + "/"), null);
});
it('writeNotification', async function() {
Expand Down

0 comments on commit 283762b

Please sign in to comment.