-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chg: [chat feeder] add matrix feeder
- Loading branch information
Showing
5 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
# -*-coding:UTF-8 -* | ||
""" | ||
The Telegram Feeder Importer Module | ||
================ | ||
Process Telegram JSON | ||
""" | ||
import os | ||
import sys | ||
import datetime | ||
|
||
sys.path.append(os.environ['AIL_BIN']) | ||
################################## | ||
# Import Project packages | ||
################################## | ||
from importer.feeders.abstract_chats_feeder import AbstractChatFeeder | ||
from lib.ConfigLoader import ConfigLoader | ||
from lib.objects import ail_objects | ||
from lib.objects.Chats import Chat | ||
from lib.objects import Messages | ||
from lib.objects import UsersAccount | ||
from lib.objects.Usernames import Username | ||
|
||
import base64 | ||
|
||
class MatrixFeeder(AbstractChatFeeder): | ||
|
||
def __init__(self, json_data): | ||
super().__init__('matrix', json_data) | ||
|
||
# def get_obj(self):. | ||
# obj_id = Messages.create_obj_id('telegram', chat_id, message_id, timestamp) | ||
# obj_id = f'message:telegram:{obj_id}' | ||
# self.obj = ail_objects.get_obj_from_global_id(obj_id) | ||
# return self.obj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters