Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup latest event handling; check room power levels accurately #309

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

kevinaboos
Copy link
Member

This PR contains some general cleanup & improvements that are follow-ups to PR #305.

  • When inspecting content from a new latest event that changed room power levels, we now look for not just an invitation being accepted but also for a general room Join action.
  • When checking a user's power level to see if they can send a message, we now check against the current power levels required to send a message, not the room's default level. We only use the default power level as a backup.

* When inspecting content from a new latest event that changed room power levels,
  we now look for not just an invitation being accepted but also for a
  general room Join action.
* When checking a user's power level to see if they can send a message,
  we now check against the current power levels required to send a message,
  not the room's default level. We only use the default power level
  as a backup.
@kevinaboos kevinaboos changed the title Cleanup latest event handling and use more accurate conditionals Cleanup latest event handling; check room power levels accurately Dec 31, 2024
@kevinaboos kevinaboos requested a review from aaravlu December 31, 2024 06:03
@kevinaboos
Copy link
Member Author

@aaravlu after merging in your latest PR #305, I noticed some minor issues with it. I've attempted to address them here in this PR and have requested your review.

Can you kindly test it out with all of the previous use cases you tested PR#305 with? )(just to make sure that I didn't break anything)

Thanks!

@aaravlu
Copy link
Contributor

aaravlu commented Jan 1, 2025

Yes, exactly right.

There are two case but I only handled Users are invited into the room:

User-initiated room joining
Users are invited into the room

And there are three message types while I only handled the content.events_default:

org.matrix.msc1767.message
m.room.message
content.events_default

src/sliding_sync.rs Show resolved Hide resolved
@kevinaboos kevinaboos merged commit 3e35595 into project-robius:main Jan 2, 2025
3 checks passed
@kevinaboos kevinaboos deleted the post_305_cleanup branch January 2, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants