time -> get_time
This commit is contained in:
@@ -140,7 +140,7 @@ async def evacuate_room(room):
|
||||
@admin.route("/_matrix/client/v1/admin/rooms/<room>/delete/status")
|
||||
async def evacuate_status(room):
|
||||
return jsonify({
|
||||
"started_at": globals.time(), # everything all at once always now!!!
|
||||
"started_at": globals.get_time(), # everything all at once always now!!!
|
||||
"total": config.the_funny_number,
|
||||
"evacuated": config.the_funny_number,
|
||||
"failed": config.the_funny_number,
|
||||
|
||||
@@ -88,7 +88,7 @@ async def users(group):
|
||||
"attestation": globals.sign_json({
|
||||
"group_id": group,
|
||||
"user_id": f"@vona:{config.server_name}",
|
||||
"valid_until_ms": globals.time()
|
||||
"valid_until_ms": globals.get_time()
|
||||
})
|
||||
}
|
||||
],
|
||||
|
||||
@@ -363,7 +363,7 @@ async def backfill(room):
|
||||
|
||||
return jsonify({
|
||||
"origin": config.server_name,
|
||||
"origin_server_ts": globals.time(),
|
||||
"origin_server_ts": globals.get_time(),
|
||||
"pdus": send_join(bullshit, room)["state"]
|
||||
})
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ from collections import Counter
|
||||
import vona.config as config
|
||||
import nacl.encoding
|
||||
import nacl.signing
|
||||
import time as ti
|
||||
import hashlib
|
||||
import base64
|
||||
import random
|
||||
import httpx
|
||||
import json
|
||||
import copy
|
||||
import time
|
||||
import re
|
||||
|
||||
version = "1.5.0"
|
||||
@@ -466,5 +466,5 @@ def strip_state(state_events) -> list:
|
||||
return new_list
|
||||
|
||||
|
||||
def time() -> int:
|
||||
return int(str(ti.time() * 1000).split(".")[0])
|
||||
def get_time() -> int:
|
||||
return int(str(time.time() * 1000).split(".")[0])
|
||||
|
||||
Reference in New Issue
Block a user