mirror of
https://github.com/SWG-Source/stationapi.git
synced 2026-07-13 21:01:03 -04:00
Ignore messages if the srcAvatar is on destAvatar's ignore list.
This commit is contained in:
@@ -24,5 +24,9 @@ SendInstantMessage::SendInstantMessage(
|
||||
throw ChatResultException(ChatResultCode::DESTAVATARDOESNTEXIST);
|
||||
}
|
||||
|
||||
if (destAvatar->IsIgnored(srcAvatar)) {
|
||||
throw ChatResultException(ChatResultCode::IGNORING);
|
||||
}
|
||||
|
||||
client->SendInstantMessageUpdate(srcAvatar, destAvatar, request.message, request.oob);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ SendPersistentMessage::SendPersistentMessage(GatewayClient * client, const Reque
|
||||
throw ChatResultException{ChatResultCode::SRCAVATARDOESNTEXIST};
|
||||
}
|
||||
|
||||
if (destAvatar->IsIgnored(srcAvatar)) {
|
||||
throw ChatResultException(ChatResultCode::IGNORING);
|
||||
}
|
||||
|
||||
message.header.fromName = srcAvatar->GetName();
|
||||
message.header.fromAddress = srcAvatar->GetAddress();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user