Skip to content

Commit

Permalink
fix: onParticipantsChange operation/action
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Aug 3, 2022
1 parent bfa0f8d commit ee28ace
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/group/events/registerParticipantsChangedEvent.ts
Expand Up @@ -30,10 +30,10 @@ function register() {
let actionType = action.actionType || action.action;
if (eventTypes.includes(actionType)) {
queueMicrotask(() => {
if (action.actionType === 'add' && action.isInvite) {
if (actionType === 'add' && action.isInvite) {
actionType = 'join';
} else if (
action.actionType === 'remove' &&
actionType === 'remove' &&
action.participants.some((p) => p.equals(meta.author))
) {
actionType = 'leave';
Expand All @@ -44,7 +44,7 @@ function register() {
authorPushName: meta.pushname,
groupId: meta.chatId.toString(),
action: actionType as any,
operation: action.actionType as any,
operation: (action.actionType || action.action) as any,
participants: action.participants.map((p) => p.toString()),
});
});
Expand Down

0 comments on commit ee28ace

Please sign in to comment.