|
|
|
@ -140,7 +140,7 @@ class MailRoom(Bureau):
|
|
|
|
|
with self.dbenv.begin(db=self.postdb_rev, write=True) as txn:
|
|
|
|
|
shortcode = txn.get(msgid)
|
|
|
|
|
if shortcode is not None:
|
|
|
|
|
return shortcode
|
|
|
|
|
return shortcode.decode("utf-8")
|
|
|
|
|
else:
|
|
|
|
|
shortcode = ''.join(random.choice(string.ascii_letters +
|
|
|
|
|
string.digits) for _ in range(5)).encode()
|
|
|
|
@ -148,7 +148,7 @@ class MailRoom(Bureau):
|
|
|
|
|
txn.put(msgid, shortcode)
|
|
|
|
|
with self.dbenv.begin(db=self.postdb, write=True) as txn:
|
|
|
|
|
txn.put(shortcode, msgid)
|
|
|
|
|
return shortcode.decode()
|
|
|
|
|
return shortcode.decode("utf-8")
|
|
|
|
|
|
|
|
|
|
@add_command("fax", "Send a Document Camera Image via Email")
|
|
|
|
|
def fax(self, data):
|
|
|
|
|