diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-01-13 21:15:36 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-01-13 21:57:07 +0100 |
| commit | 70e22576dc6fbd1a8156d4c66f39a260f83479bf (patch) | |
| tree | 29a9b5a5e0d11fff5699f409c13d8c566fdeec88 /src | |
| parent | 9e7a29e0f22afbfe5bdc0544735ad31d78758c7c (diff) | |
Call “accepted” hook only for valid invites
Diffstat (limited to 'src')
| -rw-r--r-- | src/Erebos/Invite.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Erebos/Invite.hs b/src/Erebos/Invite.hs index faeb646..89670ec 100644 --- a/src/Erebos/Invite.hs +++ b/src/Erebos/Invite.hs @@ -188,13 +188,13 @@ instance Service InviteService where serviceHandler = fromStored >>> \case AcceptInvite token -> do - asks (inviteHookAccepted . svcAttributes) >>= ($ token) invites <- fromSetBy (comparing inviteToken) . lookupSharedValue . lsShared . fromStored <$> getLocalHead case find ((Just token ==) . inviteToken) invites of Just invite | Just name <- inviteContact invite , [] <- inviteAccepted invite -> do + asks (inviteHookAccepted . svcAttributes) >>= ($ token) identity <- asks svcPeerIdentity cdata <- mstore ContactData { cdPrev = [] |