mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 12:45:35 +08:00
Ref T775, special handling for "broadcast" messages
* identify broadcast messages * do NOT play sound * use "own" tab for text messages (group together)
This commit is contained in:
committed by
Mat Sutcliffe
parent
4de544a991
commit
00ed15f111
@@ -62,6 +62,10 @@ namespace BlackMisc
|
||||
|
||||
bool CTextMessage::isSupervisorMessage() const
|
||||
{
|
||||
// ignore broadcast messages
|
||||
if (this->isBroadcastMessage()) { return false; }
|
||||
|
||||
// normal SUP message
|
||||
return m_senderCallsign.isSupervisorCallsign();
|
||||
}
|
||||
|
||||
@@ -79,6 +83,11 @@ namespace BlackMisc
|
||||
return m_relayedMessage || this->getMessage().startsWith(CTextMessage::swiftRelayMessage());
|
||||
}
|
||||
|
||||
void CTextMessage::markAsBroadcastMessage()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CTextMessage::makeRelayedMessage(const CCallsign &partnerCallsign)
|
||||
{
|
||||
if (this->getMessage().startsWith(CTextMessage::swiftRelayMessage())) { return; }
|
||||
@@ -193,6 +202,12 @@ namespace BlackMisc
|
||||
return (cs.asString().startsWith("SERVER", Qt::CaseInsensitive));
|
||||
}
|
||||
|
||||
bool CTextMessage::isBroadcastMessage() const
|
||||
{
|
||||
const CCallsign cs = this->getRecipientCallsign();
|
||||
return cs.isBroadcastCallsign();
|
||||
}
|
||||
|
||||
QString CTextMessage::asString(bool withSender, bool withRecipient, const QString &separator) const
|
||||
{
|
||||
QString s(this->getFormattedUtcTimestampHms());
|
||||
|
||||
Reference in New Issue
Block a user