mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Improve formatting of XMPP announcements
Previously private messages and announcements got handled the same way. This adds a distinct handling for server announcements, which allows formatting them in a different way. They are now not prefixed with "Private" anymore and show the announcement subject as well, if one was set. Patch by: @Dunedan Accepted by: @Stan Differential Revision: https://code.wildfiregames.com/D5268 This was SVN commit r28186.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -821,9 +821,10 @@ void XmppClient::handleMessage(const glooxwrapper::Message& msg, glooxwrapper::M
|
||||
|
||||
CreateGUIMessage(
|
||||
"chat",
|
||||
"private-message",
|
||||
msg.subtype() == gloox::Message::MessageType::Headline ? "headline" : "private-message",
|
||||
ComputeTimestamp(msg),
|
||||
"from", msg.from().resource(),
|
||||
"subject", msg.subject(),
|
||||
"text", msg.body());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user