示例#1
0
def send_text_message(subject, message, users=None, roles=None):
    text = Text(message)
    message = Message(subject=subject, body=[text])
    send_message(message, users=users, roles=roles)
示例#2
0
def set_message_subject(message, subject):
    message = Message.from_json(message)
    message.subject = subject
    return message.as_json()
示例#3
0
def send_full_message(message, users=None, roles=None):
    message = Message.from_json(message)
    send_message(message, users=users, roles=roles)
    return 'success'
示例#4
0
def append_accept_decline_message_component(message):
    message = Message.from_json(message)
    message.append(AcceptDecline())
    return message.as_json()
示例#5
0
def combine_messages(message1, message2):
    message1 = Message.from_json(message1)
    message1 += Message.from_json(message2)
    return message1.as_json()
示例#6
0
def append_text_message_component(message, text):
    message = Message.from_json(message)
    message.append(Text(text))
    return message.as_json()
示例#7
0
def append_url_message_component(message, url, title=None):
    message = Message.from_json(message)
    message.append(Url(url, title=title))
    return message.as_json()
示例#8
0
def basic_request_user_approval(users=None, roles=None):
    text = Text('A workflow requires your authentication')
    message = Message(subject='Workflow awaiting approval',
                      body=[text, AcceptDecline()])
    send_message(message, users=users, roles=roles)
    return 'success'
示例#9
0
def create_empty_message(subject=None):
    return Message(subject=subject).as_json()
示例#10
0
文件: actions.py 项目: iadgov/WALKOFF
def send_full_message(message, users=None, roles=None):
    message = Message.from_json(message)
    send_message(message, users=users, roles=roles)
    return 'success'
示例#11
0
def send_notif(subject, contents):
    text = Text(contents)
    message = Message(subject=subject, body=[text])
    send_message(message,
                 users=store.users_to_notify,
                 roles=store.roles_to_notify)
示例#12
0
文件: actions.py 项目: iadgov/WALKOFF
def set_message_subject(message, subject):
    message = Message.from_json(message)
    message.subject = subject
    return message.as_json()
示例#13
0
文件: actions.py 项目: iadgov/WALKOFF
def combine_messages(message1, message2):
    message1 = Message.from_json(message1)
    message1 += Message.from_json(message2)
    return message1.as_json()
示例#14
0
文件: actions.py 项目: iadgov/WALKOFF
def append_accept_decline_message_component(message):
    message = Message.from_json(message)
    message.append(AcceptDecline())
    return message.as_json()
示例#15
0
文件: actions.py 项目: iadgov/WALKOFF
def append_url_message_component(message, url, title=None):
    message = Message.from_json(message)
    message.append(Url(url, title=title))
    return message.as_json()
示例#16
0
文件: actions.py 项目: iadgov/WALKOFF
def append_text_message_component(message, text):
    message = Message.from_json(message)
    message.append(Text(text))
    return message.as_json()