Skip to content

Commit 840c347

Browse files
committed
removed commented out code
1 parent 027eefb commit 840c347

File tree

4 files changed

+0
-28
lines changed

4 files changed

+0
-28
lines changed

src/chat/chatLogic.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export class ChatChannel {
6161
sts.push($rdf.st(mostRecentVersion(oldMsg), ns.dct('isReplacedBy'), message, chatDocument))
6262
if (deleteIt) { // we need to add a specific signature, else anyone can delete a msg ?
6363
sts.push($rdf.st(message, ns.schema('dateDeleted'), dateStamp, chatDocument))
64-
// msg.dateDeleted = dateStamp
6564
}
6665
} else {
6766
const errMsg = 'Error you cannot delete/edit a message from someone else : \n' + oldMsgMaker.uri
@@ -86,15 +85,8 @@ export class ChatChannel {
8685
msg.maker = me.uri
8786
// privateKey the cached private key of me, cached in store
8887
const privateKey = await getPrivateKey(me) // me.uri)
89-
// const privateKey0 = 'a11bc5d2eee6cdb3b37f5473a712cad905ccfb13fb2ccdbf1be0a1ac4fdc7d2a'
9088

9189
const sig = signMsg(msg, privateKey)
92-
// const pubKey0 = '023a9da707bee1302f66083c9d95673ff969b41607a66f52686fa774d64ceb87'
93-
/* const pubKey = await getPublicKey(me)
94-
const verify = verifySignature(sig, msg, pubKey) // alain to remove
95-
debug.warn('sig ' + sig)
96-
debug.warn('verifySign ' + verify)
97-
debug.warn(msg) */
9890
sts.push($rdf.st(message, $rdf.sym(`${SEC}proofValue`), $rdf.lit(sig), chatDocument))
9991
}
10092
try {
@@ -183,7 +175,6 @@ export async function _createIfNotExists (doc, contentType = 'text/turtle', data
183175
throw err
184176
}
185177
}
186-
// debug.log('createIfNotExists: doc exists, all good: ' + doc)
187178
return response
188179
}
189180
// ends

src/chat/keys.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,6 @@ const deleteKeyAcl = async (keyDoc: string) => {
103103
* set keyDoc acl
104104
*/
105105
async function saveKey (keyDoc: string, del, add, me: string = '') {
106-
// await store.fetcher.load(keyDoc) //think we can delete this
107-
// delete keyAclDoc
108-
/* try { //here
109-
// get keyAcldoc
110-
const keyAclDoc = store.any(store.sym(keyDoc), store.sym('http://www.iana.org/assignments/link-relations/acl'))
111-
if (keyAclDoc) {
112-
// delete READ only keyAclDoc. This is possible if the webId is an owner
113-
try {
114-
const response = await store.fetcher.webOperation('DELETE', keyAclDoc.value) // this may fail if webId is not an owner
115-
debug.log('delete ' + keyAclDoc.value + ' ' + response.status) // should test 404 and 2xx
116-
} catch (err) {
117-
if (err.response.status !== 404) { throw new Error(err) }
118-
debug.log('delete ' + keyAclDoc.value + ' ' + err.response.status) // should test 404 and 2xx
119-
}
120-
}
121-
*/
122106
await deleteKeyAcl(keyDoc)
123107
// save key
124108
await store.updater.updateMany(del, add) // or a promise store.updater.update ?

src/chat/message.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,6 @@ export function renderMessageEditor (channelObject, messageTable, userContext, o
312312

313313
async function sendMessage (text, fromMainField) {
314314
function sendComplete (message, _text2) {
315-
// const dateStamp = store.any(message, ns.dct('created'), null, message.doc())
316-
// const content = $rdf.literal(text2)
317315
insertMessageIntoTable(channelObject, messageTable, message, false, options, userContext) // not green
318316

319317
if (originalMessage) { // editing another message

src/utils/keyHelpers/accessData.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as debug from '../../debug'
2-
// import { CERT } from '../../chat/signature'
32
import { store } from 'solid-logic'
43
import * as ns from '../../ns'
54
import { NamedNode } from 'rdflib'

0 commit comments

Comments
 (0)