fixed mail ordering
This commit is contained in:
parent
8549b79ac9
commit
dcc42575c3
@ -51,11 +51,10 @@ class PublicAPISecurity:
|
|||||||
resp = httpheaders.set_default_onionr_http_headers(resp)
|
resp = httpheaders.set_default_onionr_http_headers(resp)
|
||||||
# Network API version
|
# Network API version
|
||||||
resp.headers['X-API'] = public_api.API_VERSION
|
resp.headers['X-API'] = public_api.API_VERSION
|
||||||
|
# Delete some HTTP headers for Onionr user agents
|
||||||
if g.is_onionr_client:
|
if g.is_onionr_client:
|
||||||
del resp.headers['Content-Security-Policy']
|
del resp.headers['Content-Security-Policy']
|
||||||
del resp.headers['X-Frame-Options']
|
del resp.headers['X-Frame-Options']
|
||||||
del resp.headers['X-Content-Type-Options']
|
del resp.headers['X-Content-Type-Options']
|
||||||
print('deleted')
|
|
||||||
print(resp.headers)
|
|
||||||
public_api.lastRequest = epoch.get_rounded_epoch(roundS=5)
|
public_api.lastRequest = epoch.get_rounded_epoch(roundS=5)
|
||||||
return resp
|
return resp
|
@ -269,7 +269,7 @@ function getSentbox(){
|
|||||||
if (keys.length == 0){
|
if (keys.length == 0){
|
||||||
threadPart.innerHTML = "nothing to show here yet."
|
threadPart.innerHTML = "nothing to show here yet."
|
||||||
}
|
}
|
||||||
for (var i = 0; i < keys.length; i++) (function(i, resp){
|
for (var i = keys.length - 1; i > 0; i--) (function(i, resp){
|
||||||
var entry = document.createElement('div')
|
var entry = document.createElement('div')
|
||||||
var obj = resp[i]
|
var obj = resp[i]
|
||||||
var toLabel = document.createElement('span')
|
var toLabel = document.createElement('span')
|
||||||
@ -334,7 +334,7 @@ fetch('/mail/getinbox', {
|
|||||||
}})
|
}})
|
||||||
.then((resp) => resp.text()) // Transform the data into json
|
.then((resp) => resp.text()) // Transform the data into json
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
pms = data.split(',')
|
pms = data.split(',').reverse()
|
||||||
if (callNext){
|
if (callNext){
|
||||||
getInbox()
|
getInbox()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user