respect voice state for receiving file messages

we should also check on send in the future
This commit is contained in:
2024-11-06 10:50:42 +01:00
parent 01c892df8c
commit 37b92f67c8
2 changed files with 24 additions and 1 deletions

View File

@ -1165,6 +1165,13 @@ bool SHA1_NGCFT1::onEvent(const Events::NGCFT1_recv_message& e) {
return false;
}
// TODO: make perms go though contacts
// TODO: consider temporal component? not here, here is now
if (!_tcm.groupPeerCanSpeak(e.group_number, e.peer_number)) {
// peer has not the permission to speak, discard
return false; // return true?
}
uint64_t ts = Message::getTimeMS();
const auto c = _tcm.getContactGroupPeer(e.group_number, e.peer_number);