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:
|
||||
pass
|
||||
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)
|
||||
|
||||
if retData != False:
|
||||
|
@ -50,7 +50,7 @@
|
||||
"verbosity" : "default",
|
||||
|
||||
"file": {
|
||||
"output": false,
|
||||
"output": true,
|
||||
"path": "output.log"
|
||||
},
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<script defer src='/shared/navbar.js'></script>
|
||||
<script defer src='/shared/misc.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/main.js'></script>
|
||||
</head>
|
||||
@ -86,7 +86,9 @@
|
||||
<div class="column has-background-grey-dark has-text-light is-one-fifths content convoListContainer">
|
||||
<ul class='conversationList'></ul>
|
||||
</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>
|
||||
</body>
|
||||
|
||||
|
@ -25,11 +25,13 @@ function createConvoList(){
|
||||
for (friend in friendList){
|
||||
let convoEntry = document.createElement('li')
|
||||
let connectStatus = document.createElement('span')
|
||||
|
||||
if (! firstConvoLoad){
|
||||
connectStatus.classList.add("connectStatus")
|
||||
if (firstConvoLoad){
|
||||
connectStatus.innerText = " ⌛"
|
||||
}
|
||||
else{
|
||||
connectStatus.innerText = " X"
|
||||
connectStatus.style.color = "red"
|
||||
connectStatus.classList.add("connectStatus")
|
||||
console.log(direct_connections)
|
||||
if (direct_connections.hasOwnProperty(friend)){
|
||||
connectStatus.innerText = " ✅"
|
||||
|
@ -16,9 +16,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
*/
|
||||
let MessageCache = class {
|
||||
constructor(user) {
|
||||
this.user = user
|
||||
this.cache = [] // array of Messages
|
||||
|
||||
let showMessages = function(){
|
||||
let feeds = document.getElementsByClassName("chatFeed")
|
||||
for (x=0; x < feeds.length; x++){
|
||||
|
||||
}
|
||||
}
|
@ -16,11 +16,16 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
chatMessages = []
|
||||
let Message = class {
|
||||
constructor(text, to, time){
|
||||
this.text = text // string
|
||||
this.to = to // bool. False = not outgoing
|
||||
this.time = time // epoch int
|
||||
constructor(text, peer, outgoing){
|
||||
this.text = text // raw message string
|
||||
this.peer = peer // peer by public key
|
||||
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