Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Conversation

@lucassartor
Copy link
Contributor

What? β›΅

Added: New event interfaces for pre/post user leaving a room, IPreRoomUserLeave and IPostRoomUserLeave

Why? πŸ€”

Links 🌎

Task

PS πŸ‘€

@codecov
Copy link

codecov bot commented Feb 26, 2021

Codecov Report

Merging #387 (bfe5665) into alpha (ac2af0c) will decrease coverage by 0.31%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            alpha     #387      +/-   ##
==========================================
- Coverage   49.59%   49.28%   -0.32%     
==========================================
  Files         102      102              
  Lines        3176     3196      +20     
  Branches      468      472       +4     
==========================================
  Hits         1575     1575              
- Misses       1601     1621      +20     
Impacted Files Coverage Ξ”
src/server/managers/AppListenerManager.ts 6.52% <0.00%> (-0.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data
Powered by Codecov. Last update ac2af0c...bfe5665. Read the comment docs.

@lucassartor lucassartor requested a review from d-gubert February 26, 2021 17:21
@d-gubert d-gubert changed the title Chore: IPreRoomUserLeave and IPostRoomUserLeave event interfaces IPreRoomUserLeave and IPostRoomUserLeave event interfaces Mar 1, 2021
@d-gubert
Copy link
Member

d-gubert commented Mar 1, 2021

Hey @lucassartor, can you share the app you've made to test the functionality? Thanks πŸ€—

@d-gubert
Copy link
Member

d-gubert commented Mar 1, 2021

Also, regarding the Β IRoomUserLeaveContext interface, is it possible to add the user who kicked the leavingUser when that is the case? I'm not sure that is available on the Rocket.Chat side, so maybe not possible at all

@lucassartor
Copy link
Contributor Author

Hey @lucassartor, can you share the app you've made to test the functionality? Thanks πŸ€—

Sure! I'll link the compiled app that I've made to test it.
user-leave_0.0.1.zip

@lucassartor
Copy link
Contributor Author

Also, regarding the Β IRoomUserLeaveContext interface, is it possible to add the user who kicked the leavingUser when that is the case? I'm not sure that is available on the Rocket.Chat side, so maybe not possible at all

I've tried to create a kicker in the IRoomUserLeaveContext interface but I was unable to get that information from the Rocket.Chat side.
I think that's currently not possible, but I'm not 100% sure, maybe I got it wrong on the implementation.

@d-gubert
Copy link
Member

d-gubert commented Mar 2, 2021

@RocketChat/backend halp! can some of you confirm the information above is not available?

@sampaiodiego
Copy link
Member

@d-gubert
Copy link
Member

d-gubert commented Mar 2, 2021

@sampaiodiego we're wondering if it is possible to get the user who kicked another user from a room. For instance, if user A kicks user B from the room, the event will trigger with the room and user B in the context - is there a way to tell that user A was the one who made that action, so we can add this to the context as well?

@sampaiodiego
Copy link
Member

that's little messy πŸ™ˆ for event afterRemoveFromRoom we have that information.. but not sure if it triggers on all events needed.

@sampaiodiego
Copy link
Member

if that is not enough I'd say we should start using a new structure built on top of services to expand that. we can discuss how that should look like.

@d-gubert
Copy link
Member

d-gubert commented Mar 2, 2021

Ok, we'll move on with this implementation now, then. After our discussions we can add the new field if it makes sense. Thanks @sampaiodiego !

@d-gubert d-gubert merged commit efc8ed8 into alpha Mar 2, 2021
@d-gubert d-gubert deleted the task/98bc63 branch March 2, 2021 22:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants