mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
Fix spacing issue & literal content
This commit is contained in:
parent
b7520e986a
commit
a4f9d78a7a
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ const BanPolicyBody = ({ event, sender }: EventContentProps) => {
|
||||||
const prevContent = event.unsigned.prev_content as PolicyRuleContent | undefined
|
const prevContent = event.unsigned.prev_content as PolicyRuleContent | undefined
|
||||||
const mainScreen = use(MainScreenContext)
|
const mainScreen = use(MainScreenContext)
|
||||||
|
|
||||||
let entity = <span>content.entity || prevContent?.entity</span>
|
let entity = <span>{content.entity || prevContent?.entity}</span>
|
||||||
if(event.type === "m.policy.rule.user" && !content.entity?.includes("*") && !content.entity?.includes("?")) {
|
if(event.type === "m.policy.rule.user" && !content.entity?.includes("*") && !content.entity?.includes("?")) {
|
||||||
// Is user policy, and does not include the glob chars * and ?
|
// Is user policy, and does not include the glob chars * and ?
|
||||||
entity = (
|
entity = (
|
||||||
|
@ -50,8 +50,8 @@ const BanPolicyBody = ({ event, sender }: EventContentProps) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return <div className="policy-body">
|
return <div className="policy-body">
|
||||||
{sender?.content.displayname ?? event.sender} {action} a policy rule
|
{sender?.content.displayname ?? event.sender} {action} a policy rule {action === "removed" ? "un" : null}banning
|
||||||
{action === "removed" ? "un" : null}banning {entity} for {content.reason}
|
{entity} for: {content.reason}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue