Reload member device list when they change

This commit is contained in:
miruka
2020-07-08 17:26:52 -04:00
parent 8771ae2aae
commit 963b022f3d
5 changed files with 27 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import nio
from .html_markdown import HTML_PROCESSOR
from .models.items import TypeSpecifier
from .pyotherside_events import DevicesUpdated
from .utils import classes_defined_in, plain2html
if TYPE_CHECKING:
@@ -123,6 +124,8 @@ class NioCallbacks:
else:
await self.client.register_nio_room(room)
DevicesUpdated(self.user_id)
# Room events, invite events and misc events callbacks

View File

@@ -90,3 +90,10 @@ class ModelItemDeleted(ModelEvent):
@dataclass
class ModelCleared(ModelEvent):
"""Indicate that a `Backend` `Model` was cleared."""
@dataclass
class DevicesUpdated(PyOtherSideEvent):
"""Indicate changes in devices for us or users we share a room with."""
our_user_id: str = field()