import re


def get_users_in_message(message):
    """
    Scan a message for any user identifiers.
    Returns an array of user IDs, no order or uniqueness guarantees.

    message: a single message dict.
    """

    # We're going to look in two places:
    # - the "user" identifier in the message
    # - the text for strings like <@U01J94AFNTX> (can also start with W)

    userlist = [message['user']]

    for user in re.findall(r'<@([UW][A-Z0-9]+)>', message['text']):
        userlist.append(user)


    return userlist