forked from fair/matrix-puppeteer-line
Fix mistake in receipt sending
And possible mistake in member kicking
This commit is contained in:
parent
c89c59e7fc
commit
11ba99e17b
|
@ -349,9 +349,10 @@ class Portal(DBPortal, BasePortal):
|
||||||
if reaction:
|
if reaction:
|
||||||
await self.main_intent.redact(self.mxid, reaction.mxid)
|
await self.main_intent.redact(self.mxid, reaction.mxid)
|
||||||
await reaction.delete()
|
await reaction.delete()
|
||||||
|
# TODO Not just -1 if there are multiple _OWN_ puppets...
|
||||||
if receipt_count == len(self._last_participant_update) - 1:
|
if receipt_count == len(self._last_participant_update) - 1:
|
||||||
for participant in self._last_participant_update:
|
for participant in filter(lambda participant: not p.Puppet.is_mid_for_own_puppet(participant), self._last_participant_update):
|
||||||
puppet = await p.Puppet.get_by_mid(participant.id)
|
puppet = await p.Puppet.get_by_mid(participant)
|
||||||
await puppet.intent.send_receipt(self.mxid, event_id)
|
await puppet.intent.send_receipt(self.mxid, event_id)
|
||||||
else:
|
else:
|
||||||
# TODO Translatable string for "Read by"
|
# TODO Translatable string for "Read by"
|
||||||
|
@ -477,10 +478,10 @@ class Portal(DBPortal, BasePortal):
|
||||||
|
|
||||||
# Make sure puppets who should be here are here
|
# Make sure puppets who should be here are here
|
||||||
for participant in participants:
|
for participant in participants:
|
||||||
puppet = await p.Puppet.get_by_mid(participant.id)
|
|
||||||
if forbid_own_puppets and p.Puppet.is_mid_for_own_puppet(participant.id):
|
if forbid_own_puppets and p.Puppet.is_mid_for_own_puppet(participant.id):
|
||||||
continue
|
continue
|
||||||
await puppet.intent.ensure_joined(self.mxid)
|
intent = (await p.Puppet.get_by_mid(participant.id)).intent
|
||||||
|
await intent.ensure_joined(self.mxid)
|
||||||
|
|
||||||
print(current_members)
|
print(current_members)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue