def route_reply(message, marketroid_id, host): marketroid_real = addressing.real(marketroid_id) user_anon = addressing.anon(message['from'], host) reply = craft_response(message, user_anon, marketroid_real) return reply
def test_anon(): addressing.store(user_real, user_id) user_anon = addressing.anon(user_real, host) assert_equal(user_anon, user_id + '@' + host) addressing.delete(user_real)
def cleanse_incoming(message, user_id, host, marketroid_rand=None): user_real = addressing.real(user_id) if not marketroid_rand: marketroid_rand = addressing.anon(message['from'], host) reply = craft_response(message, message['from'], user_real, marketroid_rand) return reply