From 4b2b76ce81f4de2788c210790c17af8e994c1ab8 Mon Sep 17 00:00:00 2001 From: Obaro Ikoh Date: Wed, 10 Jun 2020 13:42:44 +0100 Subject: [PATCH] [rocketchat] Patch for PR #882 Signed-off-by: Obaro Ikoh --- grimoire_elk/enriched/rocketchat.py | 145 ++-- schema/rocketchat.csv | 64 ++ tests/data/rocketchat.json | 997 ++++++++++++++++++++++++++++ tests/test_rocketchat.py | 153 +++++ 4 files changed, 1292 insertions(+), 67 deletions(-) create mode 100644 schema/rocketchat.csv create mode 100644 tests/data/rocketchat.json create mode 100644 tests/test_rocketchat.py diff --git a/grimoire_elk/enriched/rocketchat.py b/grimoire_elk/enriched/rocketchat.py index 2ec95abad..9283865ec 100644 --- a/grimoire_elk/enriched/rocketchat.py +++ b/grimoire_elk/enriched/rocketchat.py @@ -17,6 +17,7 @@ # # Authors: # Animesh Kumar +# Obaro Ikoh # import logging @@ -42,7 +43,7 @@ def get_elastic_mappings(es_major): mapping = """ { "properties": { - "text_analyzed": { + "msg_analyzed": { "type": "text", "fielddata": true, "index": true @@ -56,11 +57,6 @@ def get_elastic_mappings(es_major): class RocketChatEnrich(Enrich): mapping = Mapping - def __init__(self, db_sortinghat=None, db_projects_map=None, json_projects_map=None, - db_user='', db_password='', db_host=''): - super().__init__(db_sortinghat, db_projects_map, json_projects_map, - db_user, db_password, db_host) - def get_field_author(self): return "u" @@ -99,44 +95,58 @@ def get_rich_item(self, item): message = item['data'] - eitem['text_analyzed'] = message['msg'] + eitem['msg_analyzed'] = message['msg'] eitem['msg'] = message['msg'] eitem['rid'] = message['rid'] - eitem['id'] = message['_id'] + eitem['msg_id'] = message['_id'] # parent exists in case message is a reply - eitem['parent'] = message.get('parent', None) + eitem['msg_parent'] = message.get('parent', None) - if 'u' in message and message['u']: - author = message['u'] + author = message.get('u', None) + if author: eitem['user_id'] = author.get('_id', None) eitem['user_name'] = author.get('name', None) eitem['user_username'] = author.get('username', None) - if 'editedBy' in message and message['editedBy']: + eitem['is_edited'] = 0 + editor = message.get('editedBy', None) + if editor: eitem['edited_at'] = str_to_datetime(message['editedAt']).isoformat() - editor = message['editedBy'] eitem['edited_by_username'] = editor.get('username', None) eitem['edited_by_user_id'] = editor.get('_id', None) - - if 'file' in message and message['file']: - eitem['file_id'] = message['file'].get('_id', None) - eitem['file_name'] = message['file'].get('name', None) - eitem['file_type'] = message['file'].get('type', None) - - if 'replies' in message and message['replies']: - eitem['replies'] = message['replies'] - - if 'reactions' in message and message['reactions']: - eitem.update(self.__get_reactions(message)) - - if 'mentions' in message and message['mentions']: - eitem['mentions'] = self.__get_mentions(message['mentions']) - - if 'channel_info' in message and message['channel_info']: - eitem.update(self.__get_channel_info(message['channel_info'])) - - if 'urls' in message and message['urls']: - eitem['message_urls'] = self.__get_urls(message['urls']) + eitem['is_edited'] = 1 + + file = message.get('file', None) + if file: + eitem['file_id'] = file.get('_id', None) + eitem['file_name'] = file.get('name', None) + eitem['file_type'] = file.get('type', None) + + eitem['replies'] = len(message['replies']) if message.get('replies', None) else 0 + + eitem['total_reactions'] = 0 + reactions = message.get('reactions', None) + if reactions: + reaction_types, total_reactions = self.__get_reactions(reactions) + eitem.update({'reactions': reaction_types}) + eitem['total_reactions'] = total_reactions + + eitem['total_mentions'] = 0 + mentions = message.get('mentions', None) + if mentions: + eitem['mentions'] = self.__get_mentions(mentions) + eitem['total_mentions'] = len(mentions) + + channel_info = message.get('channel_info', None) + if channel_info: + eitem.update(self.__get_channel_info(channel_info)) + + eitem['total_urls'] = 0 + urls = message.get('urls', None) + if urls: + urls = [{'url': url['url']} for url in urls] + eitem['message_urls'] = urls + eitem['total_urls'] = len(urls) if self.sortinghat: eitem.update(self.get_item_sh(item)) @@ -144,20 +154,31 @@ def get_rich_item(self, item): if self.prjs_map: eitem.update(self.get_item_project(eitem)) + eitem.update(self.get_grimoire_fields(item["metadata__updated_on"], "message")) + self.add_repository_labels(eitem) self.add_metadata_filter_raw(eitem) return eitem - def __get_reactions(self, item): + def __get_reactions(self, reactions): """Enrich reactions for the message""" - reactions = {} - - item_reactions = item.get('reactions', {}) - for reaction in item_reactions: - reactions['reaction_{}'.format(reaction)] = item_reactions[reaction] - - return reactions + reaction_types = [] + total_reactions = 0 + for reaction_type in reactions: + reaction_data = reactions[reaction_type] + usernames = reaction_data.get('usernames', []) + names = reaction_data.get('names', []) + reaction_type = { + "type": reaction_type, + "username": usernames, + "names": names, + "count": len(usernames) + } + total_reactions += len(usernames) + reaction_types.append(reaction_type) + + return reaction_types, total_reactions def __get_mentions(self, mentioned): """Enrich users mentioned in the message""" @@ -165,38 +186,28 @@ def __get_mentions(self, mentioned): rich_mentions = [] for usr in mentioned: - if '_id' in usr.keys(): - rich_mentions.append({'username': usr['username'], 'id': usr['_id'], - 'name': usr['name']}) + rich_mention = { + 'username': usr.get('username', None), + 'id': usr.get('_id', None), + 'name': usr.get('name', None) + } + rich_mentions.append(rich_mention) return rich_mentions def __get_channel_info(self, channel): """Enrich channel info of the message""" - rich_channel = {'channel_id': channel['_id'], - 'channel_updated_at': str_to_datetime(channel['_updatedAt']).isoformat(), - 'channel_num_messages': channel['msgs'], - 'channel_name': channel['name'], - 'channel_num_users': channel['usersCount'], - } + rich_channel = { + 'channel_id': channel['_id'], + 'channel_updated_at': str_to_datetime(channel['_updatedAt']).isoformat(), + 'channel_num_messages': channel['msgs'], + 'channel_name': channel['name'], + 'channel_num_users': channel['usersCount'], + 'channel_topic': channel['topic'], + } + rich_channel['avatar'] = '' if 'lastMessage' in channel and channel['lastMessage']: - rich_channel['channel_last_message_id'] = channel['lastMessage']['_id'] - rich_channel['channel_last_message'] = channel['lastMessage']['msg'] + rich_channel['avatar'] = channel['lastMessage']['avatar'] return rich_channel - - def __get_urls(self, urls): - """Enrich urls mentioned in the message""" - - rich_urls = [] - for url in urls: - rich_url = {} - if 'meta' in url: - rich_url['url_metadata_description'] = url['meta'].get('description', None) - rich_url['url_metadata_page_title'] = url['meta'].get('pageTitle', None) - rich_url['url'] = url['url'] - - rich_urls.append(rich_url) - - return rich_urls diff --git a/schema/rocketchat.csv b/schema/rocketchat.csv new file mode 100644 index 000000000..6d9fbcd40 --- /dev/null +++ b/schema/rocketchat.csv @@ -0,0 +1,64 @@ +name,type,aggregatable,description +author_bot,boolean,true,"True if the given author is identified as a bot." +author_domain,keyword,true,"Domain associated to the author in SortingHat profile." +author_gender,keyword,true,"Author gender." +author_gender_acc,keyword,true,"Accuracy to assess author gender." +author_id,keyword,true,"Author Id from SortingHat." +author_multi_org_names,keyword,true,"List of the author organizations from SortingHat profile." +author_name,keyword,true,"Author name." +author_org_name,keyword,true,"Author organization name from SortingHat profile." +author_user_name,keyword,true,"Author username from Sortinghat profile." +author_uuid,keyword,true,"Author UUID from SortingHat." +avatar,keyword,true,"Avatar associated with User profile." +channel_updated_at,date,true,"Date when channel was updated in UNIX timestamp format." +channel_id,keyword,long,true,"Channel Id of a Slack channel." +channel_num_users,long,true,"Number of members in a Rocketchat channel." +channel_num_messages,long,true,"Number of messages in a Rocketchat channel." +channel_name,keyword,true,"Channel Name." +channel_topic,keyword,true,"Channel Topic." +edited_at,date,true,"Date message was updated in UNIX timestamp format." +edited_by_user_id,keyword,true,"Message editor's user id." +edited_by_username,keyword,true,"Message editor's username." +grimoire_creation_date,date,true,"Message creation date." +file_id,keyword,true,"File id." +file_name,keyword,true,"File name." +file_type,keyword,true,"File type" +is_rocketchat_message,long,true,"1 indicating the item is a message." +is_edited,long,true,"1 indicating the message has been edited" +metadata__enriched_on,date,true,"Date when the item was enriched." +metadata__gelk_backend_name,keyword,true,"Name of the backend used to enrich information." +metadata__gelk_version,keyword,true,"Version of the backend used to enrich information." +metadata__timestamp,date,true,"Date when the item was stored in RAW index." +metadata__updated_on,date,true,"Date when the item was updated on its original data source." +metadata__filter_raw,keyword,true,"Raw filter" +message_urls.url,keyword,true,"Url on a message." +mentions.id,keyword,true,"Mentions id" +mentions.name,keyword,true,"Mentions name" +mentions.username,keyword,true,"Mentions username" +msg,keyword,true,"Message text." +msg_analyzed,keyword,true,"Message body in plain text." +msg_id,keyword,true,"Message id." +msg_parent,keyword,true,"Message parent." +origin,keyword,true,"Original URL where the channel was retrieved from." +reactions.names,keyword,true,"Names of users who used a reaction type on a message." +reactions.type,keyword,true,"reaction type on a message." +reactions.username,keyword,true,"Usernames of users who used a reaction type on a message." +replies,long,true,"Number of replies on a message." +repository_labels,keyword,true,"Custom repository labels defined by the user." +rid,keyword,true,"Channel id." +tag,keyword,true,"Perceval tag." +total_reactions,long,true,"Number of reactions in a message" +total_urls,long,true,"Number of urls in a message" +total_mentions,long,true,"Number of mentions in a message" +user_username,keyword,true,"Rocketchat user." +u_bot,long,true,"1 if the given user is identified as a bot." +u_domain,keyword,true,"Domain associated to the user in SortingHat profile." +u_gender,keyword,true,"User gender, based on her name (disabled by default)." +u_gender_acc,long,true,"User gender accuracy (disabled by default)." +u_id,keyword,true,"User Id from SortingHat." +u_multi_org_names,keyword,true,"List of the user organizations from SortingHat profile." +u_name,keyword,true,"User's name from SortingHat profile" +u_org_name,keyword,true,"User's organization name from SortingHat profile." +u_user_name,keyword,true,"User's username from SortingHat profile." +u_uuid,keyword,true,"User's UUID from SortingHat profile." +uuid,keyword,true,"Perceval UUID." diff --git a/tests/data/rocketchat.json b/tests/data/rocketchat.json new file mode 100644 index 000000000..628a43121 --- /dev/null +++ b/tests/data/rocketchat.json @@ -0,0 +1,997 @@ +[{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_hidden": true, + "_id": "FEDGKw9Fs2DG3F3ZY", + "_updatedAt": "2020-01-24T11:49:56.122Z", + "attachments": [], + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "channels": [], + "editedAt": "2020-01-24T11:49:56.122Z", + "editedBy": { + "_id": "yyQKW2dpTqbgsRWLA", + "username": "xanndcosta2401" + }, + "file": { + "_id": "gBxqCZGRfc5S9mciH", + "name": "IMG-20200115-WA0010.jpg", + "type": "image/jpeg" + }, + "groupable": false, + "mentions": [], + "msg": "", + "parent": "qvW8ii2TkE5cPvZGW", + "reactions": [], + "rid": "GENERAL", + "t": "rm", + "ts": "2020-01-24T11:19:04.201Z", + "u": { + "_id": "yyQKW2dpTqbgsRWLA", + "name": "Unknown", + "username": "Unknown" + }, + "urls": [] + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "FEDGKw9Fs2DG3F3ZY" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828185.579359, + "updated_on": 1579866596.122, + "uuid": "f81899fb341cd8c9f1e303301a69f333c4344f90" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "QTfwAlikiDThorXTn", + "_updatedAt": "2020-02-04T11:09:44.991Z", + "attachments": [ + { + "attachments": [], + "author_icon": "https://open.rocket.chat/avatar/akashchaudharymax", + "author_name": "akashchaudharymax", + "message_link": "https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx", + "text": "I want to contribute to Rocket.Chat android app but i couldn't find code for it to work upon. Can anyone please help me", + "translations": { + "ar": "\u00d8\u00a3\u00d8\u00b1\u00d8\u00ba\u00d8\u00a8 \u00d9\ufffd\u00d9\u0160 \u00d8\u00a7\u00d9\u201e\u00d9\u2026\u00d8\u00b3\u00d8\u00a7\u00d9\u2021\u00d9\u2026\u00d8\u00a9 \u00d9\ufffd\u00d9\u0160 \u00d8\u00aa\u00d8\u00b7\u00d8\u00a8\u00d9\u0160\u00d9\u201a Android Rocket.Chat \u00d9\u201e\u00d9\u0192\u00d9\u2020\u00d9\u0160 \u00d9\u201e\u00d9\u2026 \u00d8\u00a3\u00d8\u00ac\u00d8\u00af \u00d8\u00b1\u00d9\u2026\u00d8\u00b2\u00d9\u2039\u00d8\u00a7 \u00d9\u201e\u00d9\u201e\u00d8\u00b9\u00d9\u2026\u00d9\u201e \u00d8\u00b9\u00d9\u201e\u00d9\u0160\u00d9\u2021. \u00d9\u0160\u00d9\u2026\u00d9\u0192\u00d9\u2020 \u00d9\u201e\u00d8\u00a3\u00d9\u0160 \u00d8\u00b4\u00d8\u00ae\u00d8\u00b5 \u00d8\u00a7\u00d9\u201e\u00d8\u00b1\u00d8\u00ac\u00d8\u00a7\u00d8\u00a1 \u00d9\u2026\u00d8\u00b3\u00d8\u00a7\u00d8\u00b9\u00d8\u00af\u00d8\u00aa\u00d9\u0160", + "de": "Ich m\u00c3\u00b6chte einen Beitrag zur Rocket.Chat Android App leisten, aber ich konnte keinen Code finden, an dem ich arbeiten konnte. Kann mir bitte jemand helfen?", + "en": "I want to contribute to Rocket.Chat android app but i couldn't find code for it to work upon. Can anyone please help me", + "es": "Quiero contribuir a la aplicaci\u00c3\u00b3n de Android Rocket.Chat, pero no pude encontrar el c\u00c3\u00b3digo para que funcione. Alguien puede ayudarme por favor", + "fa": "\u00d9\u2026\u00d9\u2020 \u00d9\u2026\u00db\u0152 \u00d8\u00ae\u00d9\u02c6\u00d8\u00a7\u00d9\u2021\u00d9\u2026 \u00d8\u00a8\u00d9\u2021 \u00d8\u00a8\u00d8\u00b1\u00d9\u2020\u00d8\u00a7\u00d9\u2026\u00d9\u2021 \u00d8\u00a7\u00d9\u2020\u00d8\u00af\u00d8\u00b1\u00d9\u02c6\u00db\u0152\u00d8\u00af Rocket.Chat \u00da\u00a9\u00d9\u2026\u00da\u00a9 \u00da\u00a9\u00d9\u2020\u00d9\u2026 \u00d8\u00a7\u00d9\u2026\u00d8\u00a7 \u00d9\u2020\u00d8\u00aa\u00d9\u02c6\u00d8\u00a7\u00d9\u2020\u00d8\u00b3\u00d8\u00aa\u00d9\u2026 \u00da\u00a9\u00d8\u00af\u00db\u0152 \u00d8\u00b1\u00d8\u00a7 \u00d9\u00be\u00db\u0152\u00d8\u00af\u00d8\u00a7 \u00da\u00a9\u00d9\u2020\u00d9\u2026 \u00da\u00a9\u00d9\u2021 \u00d8\u00a8\u00d8\u00aa\u00d9\u02c6\u00d8\u00a7\u00d9\u2020\u00d9\u2026 \u00d8\u00b1\u00d9\u02c6\u00db\u0152 \u00d8\u00a2\u00d9\u2020 \u00da\u00a9\u00d8\u00a7\u00d8\u00b1 \u00da\u00a9\u00d9\u2020\u00d9\u2026. \u00d9\u2021\u00d8\u00b1 \u00da\u00a9\u00d8\u00b3\u00db\u0152 \u00d9\u2026\u00db\u0152 \u00d8\u00aa\u00d9\u02c6\u00d8\u00a7\u00d9\u2020\u00d8\u00af \u00d8\u00a8\u00d9\u2021 \u00d9\u2026\u00d9\u2020 \u00da\u00a9\u00d9\u2026\u00da\u00a9 \u00da\u00a9\u00d9\u2020\u00d8\u00af", + "fr": "Je veux contribuer \u00c3\u00a0 l'application Android Rocket.Chat mais je n'ai pas trouv\u00c3\u00a9 de code pour qu'elle fonctionne. Est-ce que quelqu'un peut m'aider s'il vous plait", + "hi": "\u00e0\u00a4\u00ae\u00e0\u00a5\u02c6\u00e0\u00a4\u201a Rocket.Chat Android \u00e0\u00a4\ufffd\u00e0\u00a4\u00aa \u00e0\u00a4\u00ae\u00e0\u00a5\u2021\u00e0\u00a4\u201a \u00e0\u00a4\u00af\u00e0\u00a5\u2039\u00e0\u00a4\u2014\u00e0\u00a4\u00a6\u00e0\u00a4\u00be\u00e0\u00a4\u00a8 \u00e0\u00a4\u2022\u00e0\u00a4\u00b0\u00e0\u00a4\u00a8\u00e0\u00a4\u00be \u00e0\u00a4\u0161\u00e0\u00a4\u00be\u00e0\u00a4\u00b9\u00e0\u00a4\u00a4\u00e0\u00a4\u00be \u00e0\u00a4\u00b9\u00e0\u00a5\u201a\u00e0\u00a4\u201a, \u00e0\u00a4\u00b2\u00e0\u00a5\u2021\u00e0\u00a4\u2022\u00e0\u00a4\u00bf\u00e0\u00a4\u00a8 \u00e0\u00a4\u00ae\u00e0\u00a5\ufffd\u00e0\u00a4\ufffd\u00e0\u00a5\u2021 \u00e0\u00a4\u2021\u00e0\u00a4\u00b8 \u00e0\u00a4\u00aa\u00e0\u00a4\u00b0 \u00e0\u00a4\u2022\u00e0\u00a4\u00be\u00e0\u00a4\u00ae \u00e0\u00a4\u2022\u00e0\u00a4\u00b0\u00e0\u00a4\u00a8\u00e0\u00a5\u2021 \u00e0\u00a4\u2022\u00e0\u00a5\u2021 \u00e0\u00a4\u00b2\u00e0\u00a4\u00bf\u00e0\u00a4\ufffd \u00e0\u00a4\u2022\u00e0\u00a5\u2039\u00e0\u00a4\u00a1 \u00e0\u00a4\u00a8\u00e0\u00a4\u00b9\u00e0\u00a5\u20ac\u00e0\u00a4\u201a \u00e0\u00a4\u00ae\u00e0\u00a4\u00bf\u00e0\u00a4\u00b2\u00e0\u00a4\u00be\u00e0\u00a5\u00a4 \u00e0\u00a4\u2022\u00e0\u00a5\ufffd\u00e0\u00a4\u00af\u00e0\u00a4\u00be \u00e0\u00a4\u2022\u00e0\u00a5\u2039\u00e0\u00a4\u02c6 \u00e0\u00a4\u00ae\u00e0\u00a5\u2021\u00e0\u00a4\u00b0\u00e0\u00a5\u20ac \u00e0\u00a4\u00ae\u00e0\u00a4\u00a6\u00e0\u00a4\u00a6 \u00e0\u00a4\u2022\u00e0\u00a4\u00b0 \u00e0\u00a4\u00b8\u00e0\u00a4\u2022\u00e0\u00a4\u00a4\u00e0\u00a4\u00be \u00e0\u00a4\u00b9\u00e0\u00a5\u02c6\u00e0\u00a4\u201a", + "id": "Saya ingin berkontribusi ke aplikasi android Rocket.Chat tetapi saya tidak dapat menemukan kode untuk berfungsi. Adakah yang bisa membantu saya?", + "ja": "Rocket.Chat Android\u00e3\u201a\u00a2\u00e3\u0192\u2014\u00e3\u0192\u00aa\u00e3\ufffd\u00ab\u00e8\u00b2\u00a2\u00e7\u0152\u00ae\u00e3\ufffd\u2014\u00e3\ufffd\u0178\u00e3\ufffd\u201e\u00e3\ufffd\u00ae\u00e3\ufffd\u00a7\u00e3\ufffd\u2122\u00e3\ufffd\u0152\u00e3\u20ac\ufffd\u00e5\u2039\u2022\u00e4\u00bd\u0153\u00e3\ufffd\u2122\u00e3\u201a\u2039\u00e3\u201a\u00b3\u00e3\u0192\u00bc\u00e3\u0192\u2030\u00e3\ufffd\u0152\u00e8\u00a6\u2039\u00e3\ufffd\u00a4\u00e3\ufffd\u2039\u00e3\u201a\u0160\u00e3\ufffd\u00be\u00e3\ufffd\u203a\u00e3\u201a\u201c\u00e3\ufffd\u00a7\u00e3\ufffd\u2014\u00e3\ufffd\u0178\u00e3\u20ac\u201a\u00e8\u00aa\u00b0\u00e3\ufffd\u00a7\u00e3\u201a\u201a\u00e5\u0160\u00a9\u00e3\ufffd\u2018\u00e3\ufffd\u00a6\u00e3\ufffd\ufffd\u00e3\ufffd\u00a0\u00e3\ufffd\u2022\u00e3\ufffd\u201e", + "pl": "Chc\u00c4\u2122 wsp\u00c3\u00b3\u00c5\u201apracowa\u00c4\u2021 z aplikacj\u00c4\u2026 dla systemu Android Rocket.Chat, ale nie mog\u00c5\u201aem znale\u00c5\u00ba\u00c4\u2021 kodu, na kt\u00c3\u00b3rym mog\u00c5\u201aaby dzia\u00c5\u201aa\u00c4\u2021. Czy kto\u00c5\u203a mo\u00c5\u00bce mi pom\u00c3\u00b3c", + "pt": "Quero contribuir para o aplicativo Android Rocket.Chat, mas n\u00c3\u00a3o consegui encontrar o c\u00c3\u00b3digo para trabalhar. Algu\u00c3\u00a9m pode me ajudar por favor", + "ru": "\u011e\u00af \u00d1\u2026\u011e\u00be\u00d1\u2021\u00d1\u0192 \u011e\u00b2\u011e\u00bd\u011e\u00b5\u00d1\ufffd\u00d1\u201a\u011e\u00b8 \u00d1\ufffd\u011e\u00b2\u011e\u00be\u011e\u00b9 \u011e\u00b2\u011e\u00ba\u011e\u00bb\u011e\u00b0\u011e\u00b4 \u011e\u00b2 \u011e\u00bf\u00d1\u20ac\u011e\u00b8\u011e\u00bb\u011e\u00be\u011e\u00b6\u011e\u00b5\u011e\u00bd\u011e\u00b8\u011e\u00b5 Rocket.Chat \u011e\u00b4\u011e\u00bb\u00d1\ufffd Android, \u011e\u00bd\u011e\u00be \u00d1\ufffd \u011e\u00bd\u011e\u00b5 \u00d1\ufffd\u011e\u00bc\u011e\u00be\u011e\u00b3 \u011e\u00bd\u011e\u00b0\u011e\u00b9\u00d1\u201a\u011e\u00b8 \u011e\u00ba\u011e\u00be\u011e\u00b4 \u011e\u00b4\u011e\u00bb\u00d1\ufffd \u011e\u00b5\u011e\u00b3\u011e\u00be \u00d1\u20ac\u011e\u00b0\u011e\u00b1\u011e\u00be\u00d1\u201a\u00d1\u2039. \u011e\u0153\u011e\u00be\u011e\u00b6\u011e\u00b5\u00d1\u201a \u011e\u00ba\u00d1\u201a\u011e\u00be-\u011e\u00bd\u011e\u00b8\u011e\u00b1\u00d1\u0192\u011e\u00b4\u00d1\u0152 \u011e\u00bc\u011e\u00bd\u011e\u00b5 \u011e\u00bf\u011e\u00be\u011e\u00bc\u011e\u00be\u00d1\u2021\u00d1\u0152", + "ta": "\u00e0\u00ae\u00a8\u00e0\u00ae\u00be\u00e0\u00ae\u00a9\u00e0\u00af\ufffd \u00e0\u00ae\u00b0\u00e0\u00ae\u00be\u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00af\u2020\u00e0\u00ae\u0178\u00e0\u00af\ufffd.\u00e0\u00ae\u0161\u00e0\u00ae\u00be\u00e0\u00ae\u0178\u00e0\u00af\ufffd \u00e0\u00ae\u2020\u00e0\u00ae\u00a3\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00af\ufffd\u00e0\u00ae\u00b0\u00e0\u00ae\u00be\u00e0\u00ae\u00af\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00af\ufffd \u00e0\u00ae\u00aa\u00e0\u00ae\u00af\u00e0\u00ae\u00a9\u00e0\u00af\ufffd\u00e0\u00ae\u00aa\u00e0\u00ae\u00be\u00e0\u00ae\u0178\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00ae\u00bf\u00e0\u00ae\u00b1\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00af\ufffd \u00e0\u00ae\u00aa\u00e0\u00ae\u2122\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00ae\u00b3\u00e0\u00ae\u00bf\u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u2022 \u00e0\u00ae\u00b5\u00e0\u00ae\u00bf\u00e0\u00ae\u00b0\u00e0\u00af\ufffd\u00e0\u00ae\u00ae\u00e0\u00af\ufffd\u00e0\u00ae\u00aa\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00ae\u00bf\u00e0\u00ae\u00b1\u00e0\u00af\u2021\u00e0\u00ae\u00a9\u00e0\u00af\ufffd, \u00e0\u00ae\u2020\u00e0\u00ae\u00a9\u00e0\u00ae\u00be\u00e0\u00ae\u00b2\u00e0\u00af\ufffd \u00e0\u00ae\u2026\u00e0\u00ae\u00a4\u00e0\u00af\ufffd \u00e0\u00ae\u2021\u00e0\u00ae\u00af\u00e0\u00ae\u2122\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u00b5\u00e0\u00ae\u00a4\u00e0\u00ae\u00b1\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00ae\u00be\u00e0\u00ae\u00a9 \u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u00b1\u00e0\u00ae\u00bf\u00e0\u00ae\u00af\u00e0\u00af\u20ac\u00e0\u00ae\u0178\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00af\u02c6 \u00e0\u00ae\ufffd\u00e0\u00ae\u00a9\u00e0\u00af\ufffd\u00e0\u00ae\u00a9\u00e0\u00ae\u00be\u00e0\u00ae\u00b2\u00e0\u00af\ufffd \u00e0\u00ae\u2022\u00e0\u00ae\u00a3\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00af\ufffd\u00e0\u00ae\u00aa\u00e0\u00ae\u00bf\u00e0\u00ae\u0178\u00e0\u00ae\u00bf\u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u2022 \u00e0\u00ae\u00ae\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00ae\u00bf\u00e0\u00ae\u00af\u00e0\u00ae\u00b5\u00e0\u00ae\u00bf\u00e0\u00ae\u00b2\u00e0\u00af\ufffd\u00e0\u00ae\u00b2\u00e0\u00af\u02c6. \u00e0\u00ae\u00a4\u00e0\u00ae\u00af\u00e0\u00ae\u00b5\u00e0\u00af\ufffd\u00e0\u00ae\u0161\u00e0\u00af\u2020\u00e0\u00ae\u00af\u00e0\u00af\ufffd\u00e0\u00ae\u00a4\u00e0\u00af\ufffd \u00e0\u00ae\u00af\u00e0\u00ae\u00be\u00e0\u00ae\u00b0\u00e0\u00ae\u00be\u00e0\u00ae\u00b5\u00e0\u00ae\u00a4\u00e0\u00af\ufffd \u00e0\u00ae\ufffd\u00e0\u00ae\u00a9\u00e0\u00ae\u2022\u00e0\u00af\ufffd\u00e0\u00ae\u2022\u00e0\u00af\ufffd \u00e0\u00ae\u2030\u00e0\u00ae\u00a4\u00e0\u00ae\u00b5 \u00e0\u00ae\u00ae\u00e0\u00af\ufffd\u00e0\u00ae\u0178\u00e0\u00ae\u00bf\u00e0\u00ae\u00af\u00e0\u00af\ufffd\u00e0\u00ae\u00ae\u00e0\u00ae\u00be?", + "tr": "Rocket.Chat android uygulamas\u00c4\u00b1na katk\u00c4\u00b1da bulunmak istiyorum ama \u00c3\u00bczerinde \u00c3\u00a7al\u00c4\u00b1\u00c5\u0178mas\u00c4\u00b1 i\u00c3\u00a7in kod bulamad\u00c4\u00b1m. Herkes bana yard\u00c4\u00b1m edebilir mi", + "uk": "\u011e\u00af \u00d1\u2026\u011e\u00be\u00d1\u2021\u00d1\u0192 \u011e\u00b2\u011e\u00bd\u011e\u00b5\u00d1\ufffd\u00d1\u201a\u011e\u00b8 \u00d1\ufffd\u011e\u00b2\u00d1\u2013\u011e\u00b9 \u011e\u00b2\u011e\u00bd\u011e\u00b5\u00d1\ufffd\u011e\u00be\u011e\u00ba \u00d1\u0192 \u011e\u00b4\u011e\u00be\u011e\u00b4\u011e\u00b0\u00d1\u201a\u011e\u00be\u011e\u00ba Rocket.Chat \u011e\u00b4\u011e\u00bb\u00d1\ufffd Android, \u011e\u00b0\u011e\u00bb\u011e\u00b5 \u00d1\ufffd \u011e\u00bd\u011e\u00b5 \u011e\u00b7\u011e\u00bc\u00d1\u2013\u011e\u00b3 \u011e\u00b7\u011e\u00bd\u011e\u00b0\u011e\u00b9\u00d1\u201a\u011e\u00b8 \u011e\u00ba\u011e\u00be\u011e\u00b4 \u011e\u00b4\u011e\u00bb\u00d1\ufffd \u00d1\u20ac\u011e\u00be\u011e\u00b1\u011e\u00be\u00d1\u201a\u011e\u00b8. \u011e\u00a7\u011e\u00b8 \u00d1\u2026\u00d1\u201a\u011e\u00be\u00d1\ufffd\u00d1\u0152, \u011e\u00b1\u00d1\u0192\u011e\u00b4\u00d1\u0152 \u011e\u00bb\u011e\u00b0\u00d1\ufffd\u011e\u00ba\u011e\u00b0, \u011e\u00b4\u011e\u00be\u011e\u00bf\u011e\u00be\u011e\u00bc\u011e\u00be\u011e\u00b6\u011e\u00b5 \u011e\u00bc\u011e\u00b5\u011e\u00bd\u00d1\u2013", + "zh": "\u00e6\u02c6\u2018\u00e6\u0192\u00b3\u00e4\u00b8\u00baRocket.Chat android\u00e5\u00ba\u201d\u00e7\u201d\u00a8\u00e7\u00a8\u2039\u00e5\u00ba\ufffd\u00e5\ufffd\u0161\u00e8\u00b4\u00a1\u00e7\u0152\u00ae\u00ef\u00bc\u0152\u00e4\u00bd\u2020\u00e6\u02c6\u2018\u00e6\u2030\u00be\u00e4\u00b8\ufffd\u00e5\u02c6\u00b0\u00e4\u00bb\u00a3\u00e7\u00a0\ufffd\u00e5\ufffd\u00af\u00e4\u00bb\u00a5\u00e4\u00bd\u00bf\u00e7\u201d\u00a8\u00e3\u20ac\u201a\u00e8\u00b0\ufffd\u00e8\u0192\u00bd\u00e5\u00b8\u00ae\u00e5\u00b8\u00ae\u00e6\u02c6\u2018\u00e5\ufffd\u2014", + "zh-TW": "\u00e6\u02c6\u2018\u00e6\u0192\u00b3\u00e7\u201a\u00baRocket.Chat android\u00e6\u2021\u2030\u00e7\u201d\u00a8\u00e7\u00a8\u2039\u00e5\u00ba\ufffd\u00e5\ufffd\u0161\u00e8\u00b2\u00a2\u00e7\ufffd\u00bb\u00ef\u00bc\u0152\u00e4\u00bd\u2020\u00e6\u02dc\u00af\u00e6\u02c6\u2018\u00e6\u2030\u00be\u00e4\u00b8\ufffd\u00e5\u02c6\u00b0\u00e4\u00bb\u00a3\u00e7\u00a2\u00bc\u00e5\ufffd\u00af\u00e4\u00bb\u00a5\u00e4\u00bd\u00bf\u00e7\u201d\u00a8\u00e3\u20ac\u201a\u00e8\u00aa\u00b0\u00e8\u0192\u00bd\u00e5\u00b9\u00ab\u00e5\u00b9\u00ab\u00e6\u02c6\u2018\u00e5\u2014\ufffd" + }, + "ts": "2020-02-04T06:37:45.093Z" + } + ], + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "channels": [], + "mentions": [], + "msg": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) On Github", + "reactions": { + ":banana:": { + "names": [ + "json" + ], + "usernames": [ + "jsonjoe" + ] + }, + ":bee:": { + "names": [ + "json" + ], + "usernames": [ + "jsonjoe" + ] + }, + ":troll:": { + "names": [ + "json", + "Arcane Omniscient" + ], + "usernames": [ + "jsonjoe", + "arcane.omniscient" + ] + } + }, + "rid": "GENERAL", + "translations": { + "ar": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) \u00d8\u00b9\u00d9\u201e\u00d9\u2030 \u00d8\u00ac\u00d9\u0160\u00d8\u00ab\u00d8\u00a8", + "de": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) Auf Github", + "en": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) On Github", + "es": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) en Github", + "fa": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) \u00d8\u00af\u00d8\u00b1 \u00da\u00af\u00db\u0152\u00d8\u00aa\u00d9\u02c6\u00d8\u00a8", + "fr": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) Sur Github", + "hi": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) \u00e0\u00a4\u2014\u00e0\u00a4\u00bf\u00e0\u00a4\u00a4\u00e0\u00a5\ufffd\u00e0\u00a4\u00ac \u00e0\u00a4\u00aa\u00e0\u00a4\u00b0", + "id": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) Di Github", + "ja": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) Github\u00e3\ufffd\u00a7", + "pl": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) W serwisie Github", + "pt": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) No Github", + "ru": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) \u011e\u00bd\u011e\u00b0 Github", + "ta": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx)", + "tr": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) On Github", + "uk": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx) \u011e\ufffd\u011e\u00b0 Github", + "zh": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx)\u00e5\u0153\u00a8Github\u00e4\u00b8\u0160", + "zh-TW": "[ ](https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx)\u00e5\u0153\u00a8Github\u00e4\u00b8\u0160" + }, + "ts": "2020-02-04T07:04:49.566Z", + "u": { + "_id": "niFhx5gKsztKEkzDh", + "name": "json", + "username": "jsonjoe" + }, + "urls": [ + { + "ignoreParse": true, + "url": "https://open.rocket.chat/channel/general?msg=3Dv6at5SYgBjf9kyx" + } + ] + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "QTfwAlikiDThorXTn" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828287.382039, + "updated_on": 1580814584.991, + "uuid": "2abf07e25ae6cc50c849a8812005ecc71dc2e1cc" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "b4f516ea-f0bd-4883-9750-0bf1dc5cdb64", + "_updatedAt": "2020-01-09T03:05:15.774Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "channels": [], + "mentions": [], + "msg": "Iejenx", + "replies": [ + "DtQcvbSJJGTpFQFBf", + "sQXAtsXjbQWJGqC5D" + ], + "rid": "GENERAL", + "starred": [], + "tcount": 3, + "tlm": "2020-01-09T03:05:15.640Z", + "translations": { + "ar": "Iejenx", + "de": "Iejenx", + "en": "Iejenx", + "es": "Iejenx", + "fa": "Iejenx", + "fr": "Iejenx", + "hi": "Iejenx", + "id": "Iejenx", + "ja": "Iejenx", + "pl": "Iejenx", + "pt": "Iejenx", + "ru": "Iejenx", + "ta": "Iejenx", + "tr": "Iejenx", + "uk": "Iejenx", + "zh": "Iejenx", + "zh-TW": "Iejenx" + }, + "ts": "2020-01-09T02:31:41.487Z", + "u": { + "_id": "DtQcvbSJJGTpFQFBf", + "name": "foohwa", + "username": "foohwa12" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "b4f516ea-f0bd-4883-9750-0bf1dc5cdb64" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828085.464754, + "updated_on": 1578539115.774, + "uuid": "cd6ed5978f77efe232bdde1aa0a6b6cb327d42a1" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "SW7uKMbaLoKxNprZh", + "_updatedAt": "2020-01-24T12:00:41.249Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "AdmiralSperg", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T11:59:15.705Z", + "u": { + "_id": "9Ho3iGpzWZFaNWzgk", + "name": "AdmiralSperg1", + "username": "AdmiralSperg1" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "SW7uKMbaLoKxNprZh" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828185.580921, + "updated_on": 1579867241.249, + "uuid": "55b1a3391b7c659ecb9aa722eb1fdb12780004f7" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "dYnsJoEhEEHG78rTr", + "_updatedAt": "2020-01-24T12:02:07.956Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "tsingyao", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T12:02:07.956Z", + "u": { + "_id": "Rn2PvPub5eBNzD5PF", + "name": "\u6e05\u66dc\u7f51\u7edc", + "username": "tsingyao" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "dYnsJoEhEEHG78rTr" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828185.581351, + "updated_on": 1579867327.956, + "uuid": "0681e781a81708063c5345e117810da2e21d1ef0" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "wxD47jdHxK7KTCfsP", + "_updatedAt": "2020-01-24T12:04:19.163Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "romulo.sup.pack", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T12:04:19.163Z", + "u": { + "_id": "pWK22eSkwepfbYnM6", + "name": "R\u00f4mulo Lins", + "username": "romulo.sup.pack" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "wxD47jdHxK7KTCfsP" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828185.582238, + "updated_on": 1579867459.163, + "uuid": "9f815aee40fd3ffdb954e67b01bd03b5d697f8fe" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "Xg4HuDc3mt7ycLvqD", + "_updatedAt": "2020-01-24T12:29:36.189Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "schmidt.st", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T12:29:36.189Z", + "u": { + "_id": "D9C9ELj4iZsBfnMkj", + "name": "Stefan", + "username": "schmidt.st" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "Xg4HuDc3mt7ycLvqD" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828185.582597, + "updated_on": 1579868976.189, + "uuid": "a0a4b25cdb27ff1733ad706ba3666b7aa5d6839c" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "jewxvFPDXEEpbPhuW", + "_updatedAt": "2020-01-24T12:38:49.886Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "denio.gomes", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T12:38:49.886Z", + "u": { + "_id": "F4KCcdb3rHANtHPux", + "name": "D\u00c3\u00aanio Gomes", + "username": "denio.gomes" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "jewxvFPDXEEpbPhuW" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828187.830494, + "updated_on": 1579869529.886, + "uuid": "1ca1e192103e1649231d4bfbd98a1b7dd4e0b77a" +}, +{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "tNcKxg9gs9jYvBnX7", + "_updatedAt": "2020-01-24T12:40:13.448Z", + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "groupable": false, + "msg": "raquel.baldussi", + "rid": "GENERAL", + "t": "uj", + "ts": "2020-01-24T12:40:13.448Z", + "u": { + "_id": "EqX82yYnCvJTMnzrb", + "name": "raquel.baldussi", + "username": "raquel.baldussi" + } + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "tNcKxg9gs9jYvBnX7" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828187.831096, + "updated_on": 1579869613.448, + "uuid": "f99445473b5af22bb571408d89d209cbf8fb1460" +},{ + "backend_name": "RocketChat", + "backend_version": "0.1.0", + "category": "message", + "classified_fields_filtered": null, + "data": { + "_id": "K8JjHuB43qg9vNuEN", + "_updatedAt": "2020-01-18T21:37:18.094Z", + "attachments": [], + "channel_info": { + "_id": "GENERAL", + "_updatedAt": "2020-06-10T22:24:56.891Z", + "announcement": "Please review our [Code of Conduct](https://rocket.chat/code-of-conduct). Violations, including unwanted solicitations, will not be tolerated.", + "default": true, + "jitsiTimeout": "2020-06-05T02:43:19.459Z", + "lastMessage": { + "_id": "rhjdPaWuwEacmpToC", + "_updatedAt": "2020-06-10T22:23:34.000Z", + "alias": "acooma", + "attachments": [ + { + "author_link": "https://github.com/RocketChat/Rocket.Chat/stargazers", + "author_name": "Click here to star the project too.", + "ts": "1970-01-01T00:00:00.000Z" + } + ], + "avatar": "https://avatars1.githubusercontent.com/u/25372243?v=4", + "bot": { + "i": "QyWmDsdtdyzvkjucS" + }, + "channels": [], + "groupable": false, + "mentions": [], + "msg": ":star: starred [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat). We have now *27230* stars at GitHub.", + "parseUrls": false, + "rid": "GENERAL", + "ts": "2020-06-10T22:23:33.956Z", + "u": { + "_id": "rocket.cat", + "name": "Rocket.Cat", + "username": "rocket.cat" + } + }, + "lm": "2020-06-10T22:23:33.956Z", + "msgs": 714994, + "muted": [ + "geekgonecrazy", + "alexa32", + "fixedgames2088", + "terrygarry1", + "petersmid40", + "timeyinblessing14", + "sarahcourt63" + ], + "name": "general", + "t": "c", + "topic": "Community support in [#support](https://open.rocket.chat/channel/support). Discussions in our [forums](https://forums.rocket.chat/). Find jobs in [#jobs](https://open.rocket.chat/channel/jobs)", + "unmuted": [ + "singli" + ], + "usersCount": 315467 + }, + "channels": [], + "editedAt": "2020-01-18T21:37:18.094Z", + "editedBy": { + "_id": "DkznQ6zmk9Bjn6Xeq", + "username": "boiethios" + }, + "mentions": [], + "msg": "", + "reactions": [], + "replies": [ + "DkznQ6zmk9Bjn6Xeq" + ], + "rid": "GENERAL", + "t": "rm", + "tcount": 1, + "tlm": "2020-01-18T21:36:51.129Z", + "translations": { + "ar": "\u0645\u0648\u0636\u0648\u0639 \u0622\u062e\u0631", + "de": "Ein weiterer Thread", + "en": "Another thread", + "es": "Otro hilo", + "fa": "\u0645\u0648\u0636\u0648\u0639 \u062f\u06cc\u06af\u0631", + "fr": "Un autre fil", + "hi": "\u090f\u0915 \u0914\u0930 \u0927\u093e\u0917\u093e", + "id": "Utas lainnya", + "ja": "\u5225\u306e\u30b9\u30ec\u30c3\u30c9", + "pl": "Kolejny w\u0105tek", + "pt": "Outra discuss\u00e3o", + "ru": "\u0414\u0440\u0443\u0433\u0430\u044f \u0442\u0435\u043c\u0430", + "ta": "\u0bae\u0bb1\u0bcd\u0bb1\u0bca\u0bb0\u0bc1 \u0ba8\u0bc2\u0bb2\u0bcd", + "tr": "Ba\u015fka bir i\u015f par\u00e7ac\u0131\u011f\u0131", + "uk": "\u0429\u0435 \u043e\u0434\u043d\u0430 \u043d\u0438\u0442\u043a\u0430", + "zh": "\u53e6\u4e00\u4e2a\u7ebf\u7a0b", + "zh-TW": "\u53e6\u4e00\u500b\u7dda\u7a0b" + }, + "ts": "2020-01-18T21:36:11.594Z", + "u": { + "_id": "DkznQ6zmk9Bjn6Xeq", + "name": "Boiethios", + "username": "boiethios" + }, + "urls": [] + }, + "origin": "https://open.rocket.chat/general", + "perceval_version": "0.14.0", + "search_fields": { + "channel_id": "GENERAL", + "channel_name": "general", + "item_id": "K8JjHuB43qg9vNuEN" + }, + "tag": "https://open.rocket.chat/general", + "timestamp": 1591828152.153906, + "updated_on": 1579383438.094, + "uuid": "e89af1b04333ca86355690b7a2fded58d211bde7" +}] \ No newline at end of file diff --git a/tests/test_rocketchat.py b/tests/test_rocketchat.py new file mode 100644 index 000000000..219952abb --- /dev/null +++ b/tests/test_rocketchat.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2015-2019 Bitergia +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Authors: +# Obaro Ikoh +# +import logging +import unittest + +import requests +from base import TestBaseBackend +from grimoire_elk.enriched.utils import REPO_LABELS + + +class TestRocketChat(TestBaseBackend): + """Test RocketChat backend""" + + connector = "rocketchat" + ocean_index = "test_" + connector + enrich_index = "test_" + connector + "_enrich" + + def test_has_identites(self): + """Test value of has_identities method""" + + enrich_backend = self.connectors[self.connector][2]() + self.assertTrue(enrich_backend.has_identities()) + + def test_items_to_raw(self): + """Test whether JSON items are properly inserted into ES""" + + result = self._test_items_to_raw() + self.assertEqual(result['items'], 10) + self.assertEqual(result['raw'], 10) + + for item in self.items: + self.ocean_backend._fix_item(item) + + self.assertNotIn('previous_names', item['data']['channel_info']) + + def test_raw_to_enrich(self): + """Test whether the raw index is properly enriched""" + + result = self._test_raw_to_enrich() + self.assertEqual(result['raw'], 10) + self.assertEqual(result['enrich'], 10) + + enrich_backend = self.connectors[self.connector][2]() + + item = self.items[0] + eitem = enrich_backend.get_rich_item(item) + self.assertEqual(eitem['is_edited'], 1) + self.assertEqual(eitem['avatar'], 'https://avatars1.githubusercontent.com/u/25372243?v=4') + self.assertEqual(eitem['channel_topic'], 'Community support') + self.assertIn(REPO_LABELS, eitem) + + item = self.items[1] + eitem = enrich_backend.get_rich_item(item) + self.assertEqual(eitem['total_reactions'], 4) + self.assertEqual(eitem['total_urls'], 1) + + item = self.items[9] + eitem = enrich_backend.get_rich_item(item) + self.assertEqual(eitem['total_reactions'], 0) + + item = self.items[2] + eitem = enrich_backend.get_rich_item(item) + self.assertEqual(eitem['replies'], 2) + + def test_enrich_repo_labels(self): + """Test whether the field REPO_LABELS is present in the + enriched items""" + + self._test_raw_to_enrich() + enrich_backend = self.connectors[self.connector][2]() + + for item in self.items: + eitem = enrich_backend.get_rich_item(item) + self.assertIn(REPO_LABELS, eitem) + + def test_raw_to_enrich_sorting_hat(self): + """Test enrich with SortingHat""" + + result = self._test_raw_to_enrich(sortinghat=True) + self.assertEqual(result['raw'], 10) + self.assertEqual(result['enrich'], 10) + + enrich_backend = self.connectors[self.connector][2]() + enrich_backend.sortinghat = True + + item = self.items[0] + eitem = enrich_backend.get_rich_item(item) + self.assertEqual(eitem['author_name'], 'Unknown') + self.assertEqual(eitem['author_user_name'], 'Unknown') + self.assertEqual(eitem['author_org_name'], 'Unknown') + self.assertEqual(eitem['author_multi_org_names'], ['Unknown']) + + def test_raw_to_enrich_projects(self): + """Test enrich with Projects""" + + result = self._test_raw_to_enrich(projects=True) + self.assertEqual(result['raw'], 10) + self.assertEqual(result['enrich'], 10) + + res = requests.get(self.es_con + "/" + self.enrich_index + "/_search", verify=False) + for eitem in res.json()['hits']['hits']: + self.assertEqual(eitem['_source']['project'], "Main") + + def test_copy_raw_fields(self): + """Test copied raw fields""" + + self._test_raw_to_enrich() + enrich_backend = self.connectors[self.connector][2]() + + for item in self.items: + eitem = enrich_backend.get_rich_item(item) + for attribute in enrich_backend.RAW_FIELDS_COPY: + if attribute in item: + self.assertEqual(item[attribute], eitem[attribute]) + else: + self.assertIsNone(eitem[attribute]) + + def test_refresh_identities(self): + """Test refresh identities""" + + result = self._test_refresh_identities() + # ... ? + + def test_refresh_project(self): + """Test refresh project field for all sources""" + + result = self._test_refresh_project() + # ... ? + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s') + logging.getLogger("urllib3").setLevel(logging.WARNING) + logging.getLogger("requests").setLevel(logging.WARNING) + unittest.main(warnings='ignore')