fixed inserted blocks not having default expire in meta db
work on chat
This commit is contained in:
parent
80098d39c1
commit
a69cb17e47
@ -136,6 +136,12 @@ def insert_block(data, header='txt', sign=False, encryptType='', symKey='', asym
|
|||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
coredb.blockmetadb.add.add_to_block_DB(retData, selfInsert=True, dataSaved=True)
|
coredb.blockmetadb.add.add_to_block_DB(retData, selfInsert=True, dataSaved=True)
|
||||||
|
|
||||||
|
if expire is None:
|
||||||
|
coredb.blockmetadb.update_block_info(retData, 'expire', createTime + onionrvalues.DEFAULT_EXPIRE)
|
||||||
|
else:
|
||||||
|
coredb.blockmetadb.update_block_info(retData, 'expire', expire)
|
||||||
|
|
||||||
blockmetadata.process_block_metadata(retData)
|
blockmetadata.process_block_metadata(retData)
|
||||||
|
|
||||||
if retData != False:
|
if retData != False:
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
"verbosity" : "default",
|
"verbosity" : "default",
|
||||||
|
|
||||||
"file": {
|
"file": {
|
||||||
"output": false,
|
"output": true,
|
||||||
"path": "output.log"
|
"path": "output.log"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<script defer src='/shared/navbar.js'></script>
|
<script defer src='/shared/navbar.js'></script>
|
||||||
<script defer src='/shared/misc.js'></script>
|
<script defer src='/shared/misc.js'></script>
|
||||||
<script defer src='/shared/direct-connections.js'></script>
|
<script defer src='/shared/direct-connections.js'></script>
|
||||||
<script defer src='/chat/messages.js'></script>
|
<script defer src='/chat/js/messages.js'></script>
|
||||||
<script defer src='/chat/js/message-feed.js'></script>
|
<script defer src='/chat/js/message-feed.js'></script>
|
||||||
<script defer src='/chat/js/main.js'></script>
|
<script defer src='/chat/js/main.js'></script>
|
||||||
</head>
|
</head>
|
||||||
@ -86,7 +86,9 @@
|
|||||||
<div class="column has-background-grey-dark has-text-light is-one-fifths content convoListContainer">
|
<div class="column has-background-grey-dark has-text-light is-one-fifths content convoListContainer">
|
||||||
<ul class='conversationList'></ul>
|
<ul class='conversationList'></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="column chatBox has-text-light has-background-dark is-four-fifths"></div>
|
<div class="column chatBox has-text-light has-background-dark is-four-fifths">
|
||||||
|
<span class="chatFeed"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -25,11 +25,13 @@ function createConvoList(){
|
|||||||
for (friend in friendList){
|
for (friend in friendList){
|
||||||
let convoEntry = document.createElement('li')
|
let convoEntry = document.createElement('li')
|
||||||
let connectStatus = document.createElement('span')
|
let connectStatus = document.createElement('span')
|
||||||
|
connectStatus.classList.add("connectStatus")
|
||||||
if (! firstConvoLoad){
|
if (firstConvoLoad){
|
||||||
|
connectStatus.innerText = " ⌛"
|
||||||
|
}
|
||||||
|
else{
|
||||||
connectStatus.innerText = " X"
|
connectStatus.innerText = " X"
|
||||||
connectStatus.style.color = "red"
|
connectStatus.style.color = "red"
|
||||||
connectStatus.classList.add("connectStatus")
|
|
||||||
console.log(direct_connections)
|
console.log(direct_connections)
|
||||||
if (direct_connections.hasOwnProperty(friend)){
|
if (direct_connections.hasOwnProperty(friend)){
|
||||||
connectStatus.innerText = " ✅"
|
connectStatus.innerText = " ✅"
|
||||||
|
@ -16,9 +16,10 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
let MessageCache = class {
|
|
||||||
constructor(user) {
|
let showMessages = function(){
|
||||||
this.user = user
|
let feeds = document.getElementsByClassName("chatFeed")
|
||||||
this.cache = [] // array of Messages
|
for (x=0; x < feeds.length; x++){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -16,11 +16,16 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
chatMessages = []
|
||||||
let Message = class {
|
let Message = class {
|
||||||
constructor(text, to, time){
|
constructor(text, peer, outgoing){
|
||||||
this.text = text // string
|
this.text = text // raw message string
|
||||||
this.to = to // bool. False = not outgoing
|
this.peer = peer // peer by public key
|
||||||
this.time = time // epoch int
|
this.outgoing = outgoing // boolean. false = outgoing message
|
||||||
|
this.time = new Date().toISOString()
|
||||||
|
//this.tempIdentifier = Math.floor(Math.random() * 100000000000000000);
|
||||||
|
chatMessages.push(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//let addMessage = function(){}
|
Loading…
Reference in New Issue
Block a user