diff options
Diffstat (limited to 'src/Message.hs')
-rw-r--r-- | src/Message.hs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Message.hs b/src/Message.hs index bfb4b66..ee59dad 100644 --- a/src/Message.hs +++ b/src/Message.hs @@ -84,14 +84,11 @@ instance Service DirectMessageService where shared <- makeSharedStateUpdate st [next] (lsShared $ fromStored erb) wrappedStore st (fromStored erb) { lsShared = [shared] } svcSetLocal erb' - if powner `sameIdentity` msgFrom msg - then do - svcPrint $ formatMessage tzone msg - return $ Just $ DirectMessagePacket smsg - else return Nothing - - else do svcPrint "Owner mismatch" - return Nothing + when (powner `sameIdentity` msgFrom msg) $ do + svcPrint $ formatMessage tzone msg + replyStoredRef packet + + else svcPrint "Owner mismatch" instance Storable (ServicePacket DirectMessageService) where store' (DirectMessagePacket smsg) = store' smsg |