2019-04-12 18:33:09 +10:00
|
|
|
# Copyright 2019 miruka
|
|
|
|
# This file is part of harmonyqml, licensed under GPLv3.
|
|
|
|
|
2019-04-15 06:12:07 +10:00
|
|
|
from typing import Dict, List, NamedTuple, Optional
|
2019-04-12 18:33:09 +10:00
|
|
|
|
|
|
|
from PyQt5.QtCore import QDateTime
|
|
|
|
|
|
|
|
|
|
|
|
class User(NamedTuple):
|
|
|
|
user_id: str
|
|
|
|
display_name: str
|
|
|
|
avatar_url: Optional[str] = None
|
|
|
|
status_message: Optional[str] = None
|
|
|
|
|
|
|
|
|
|
|
|
class Room(NamedTuple):
|
2019-04-15 06:12:07 +10:00
|
|
|
room_id: str
|
|
|
|
display_name: Optional[str]
|
|
|
|
description: str = ""
|
|
|
|
typing_users: List[str] = []
|
2019-04-12 18:33:09 +10:00
|
|
|
|
|
|
|
|
2019-04-15 02:56:30 +10:00
|
|
|
class RoomEvent(NamedTuple):
|
|
|
|
type: str
|
|
|
|
date_time: QDateTime
|
|
|
|
dict: Dict[str, str]
|