| ... |
... |
@@ -696,10 +696,12 @@ def _process_occupant_presence_change( |
|
696
|
696
|
status_codes=properties.muc_status_codes)
|
|
697
|
697
|
|
|
698
|
698
|
occupant.update_presence(presence)
|
|
699
|
|
- occupant.notify('user-joined', properties)
|
|
|
699
|
+ app.storage.events.store(self.room, event)
|
|
|
700
|
+ occupant.notify('user-joined', event)
|
|
700
|
701
|
return
|
|
701
|
702
|
|
|
702
|
703
|
if not presence.available:
|
|
|
704
|
+
|
|
703
|
705
|
event = events.MUCUserLeft(
|
|
704
|
706
|
timestamp=timestamp,
|
|
705
|
707
|
is_self=properties.is_muc_self_presence,
|
| ... |
... |
@@ -709,12 +711,14 @@ def _process_occupant_presence_change( |
|
709
|
711
|
actor=properties.muc_user.actor)
|
|
710
|
712
|
|
|
711
|
713
|
occupant.update_presence(presence)
|
|
712
|
|
- occupant.notify('user-left', properties)
|
|
|
714
|
+ app.storage.events.store(self.room, event)
|
|
|
715
|
+ occupant.notify('user-left', event)
|
|
713
|
716
|
return
|
|
714
|
717
|
|
|
715
|
718
|
signals_and_events: list[tuple[str, Any]] = []
|
|
716
|
719
|
|
|
717
|
720
|
if occupant.affiliation != presence.affiliation:
|
|
|
721
|
+
|
|
718
|
722
|
event = events.MUCUserAffiliationChanged(
|
|
719
|
723
|
timestamp=timestamp,
|
|
720
|
724
|
is_self=properties.is_muc_self_presence,
|
| ... |
... |
@@ -726,6 +730,7 @@ def _process_occupant_presence_change( |
|
726
|
730
|
signals_and_events.append(('user-affiliation-changed', event))
|
|
727
|
731
|
|
|
728
|
732
|
if occupant.role != presence.role:
|
|
|
733
|
+
|
|
729
|
734
|
event = events.MUCUserRoleChanged(
|
|
730
|
735
|
timestamp=timestamp,
|
|
731
|
736
|
is_self=properties.is_muc_self_presence,
|
| ... |
... |
@@ -751,7 +756,7 @@ def _process_occupant_presence_change( |
|
751
|
756
|
occupant.update_presence(presence)
|
|
752
|
757
|
for signal, event in signals_and_events:
|
|
753
|
758
|
app.storage.events.store(self.room, event)
|
|
754
|
|
- occupant.notify(signal, properties)
|
|
|
759
|
+ occupant.notify(signal, event)
|
|
755
|
760
|
|
|
756
|
761
|
def _process_user_presence(self,
|
|
757
|
762
|
properties: PresenceProperties
|