コード例 #1
0
ファイル: filter.py プロジェクト: 3kwa/lamson
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
コード例 #2
0
ファイル: addressing_tests.py プロジェクト: 3kwa/lamson
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)
コード例 #3
0
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
コード例 #4
0
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)
コード例 #5
0
ファイル: filter.py プロジェクト: 3kwa/lamson
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
コード例 #6
0
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