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

New invite not stored when there is an existing invite with the same address but different room ID #99

Open
ghost opened this issue Aug 18, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 18, 2021

When there is an existing invite for the same address, it's not possible to store a new invite with a different room ID. Is this the expected behavior?

IThreePidInviteReply reply = invitations.get(invId);
if (reply != null) {
log.info("Invite is already pending for {}:{}, returning data", invitation.getMedium(), invitation.getAddress());
if (!StringUtils.equals(invitation.getRoomId(), reply.getInvite().getRoomId())) {
log.info("Sending new notification as new invite room {} is different from the original {}", invitation.getRoomId(),
reply.getInvite().getRoomId());
notifMgr.sendForReply(
new ThreePidInviteReply(reply.getId(), invitation, reply.getToken(), reply.getDisplayName(), reply.getPublicKeys()));
} else {
// FIXME we should check attempt and send if bigger
}
return reply;
}

^ It seems like storage.insertInvite(); won't be called if there's an existing invite for the same address. An invite for another room should be considered as a new invite.

Craeckie pushed a commit to Craeckie/ma1sd that referenced this issue Dec 12, 2022
….directory.api-api-all-2.1.2

Bump api-all from 2.1.0 to 2.1.2
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

No branches or pull requests

0 participants