Fixing moderation message

This commit is contained in:
Luca Frosini 2022-04-04 18:12:31 +02:00
parent c07f5fc354
commit 9a0d965745
1 changed files with 8 additions and 8 deletions

View File

@ -58,9 +58,9 @@ public abstract class ModerationThread {
createModerationThread();
String fullName = ckanUser.getNameSurname();
CMItemStatus cmItemStatus = CMItemStatus.PENDING;
// String message = String.format("@**%s** has created the item with name '%s' (id='%s'). The item is now in **%s** state and must be moderated.",
// String message = String.format("@**%s** created the item with name '%s' (id='%s'). The item is now in **%s** state and must be moderated.",
// username, itemName, itemID, cmItemStatus.getFancyValue());
String message = String.format("%s has created the item with name '%s' (id='%s'). The item is now in %s state and must be moderated.",
String message = String.format("%s created the item with name '%s' (id='%s'). The item is now in %s state and must be moderated.",
fullName, itemName, itemID, cmItemStatus.getFancyValue());
postMessage(cmItemStatus, message);
}
@ -68,9 +68,9 @@ public abstract class ModerationThread {
public void postItemUpdated() throws Exception {
String fullName = ckanUser.getNameSurname();
CMItemStatus cmItemStatus = CMItemStatus.PENDING;
// String message = String.format("@**%s** has updated the item with name '%s' (id='%s'). The item is now in **%s** state and must be moderated.",
// String message = String.format("@**%s** updated the item with name '%s' (id='%s'). The item is now in **%s** state and must be moderated.",
// username, itemName, itemID, cmItemStatus.getFancyValue());
String message = String.format("%s has updated the item with name '%s' (id='%s'). The item is now in %s state and must be moderated.",
String message = String.format("%s updated the item with name '%s' (id='%s'). The item is now in %s state and must be moderated.",
fullName, itemName, itemID, cmItemStatus.getFancyValue(), itemURL);
postMessage(cmItemStatus, message);
}
@ -78,9 +78,9 @@ public abstract class ModerationThread {
public void postItemRejected(String userMessage) throws Exception {
String fullName = ckanUser.getNameSurname();
CMItemStatus cmItemStatus = CMItemStatus.REJECTED;
// String message = String.format("@**%s** has **%s** the item with name '%s' (id='%s'). The author can delete the item or update it to try to meet moderators requests if any.",
// String message = String.format("@**%s** **%s** the item with name '%s' (id='%s'). The author can delete the item or update it to try to meet moderators requests if any.",
// username, cmItemStatus.getFancyValue(), itemName, itemID,);
String message = String.format("%s has %s the item with name '%s' (id='%s'). The author can delete the item or update it to try to meet moderators requests if any.",
String message = String.format("%s %s the item with name '%s' (id='%s'). The author can delete the item or update it to try to meet moderators requests if any.",
fullName, cmItemStatus.getFancyValue(), itemName, itemID);
postMessage(cmItemStatus, message);
postUserMessage(cmItemStatus, userMessage);
@ -89,9 +89,9 @@ public abstract class ModerationThread {
public void postItemApproved(String userMessage) throws Exception{
String fullName = ckanUser.getNameSurname();
CMItemStatus cmItemStatus = CMItemStatus.APPROVED;
// String message = String.format("@**%s** has **%s** the item with name '%s' (id='%s'). The item is now available in the catalogue. The item is available at %s",
// String message = String.format("@**%s** **%s** the item with name '%s' (id='%s'). The item is now available in the catalogue. The item is available at %s",
// username, cmItemStatus.getFancyValue(), itemName, itemID, itemURL);
String message = String.format("%s has %s the item with name '%s' (id='%s'). The item is now available in the catalogue. The item is available at %s",
String message = String.format("%s %s the item with name '%s' (id='%s'). The item is now available in the catalogue. The item is available at %s",
fullName, cmItemStatus.getFancyValue(), itemName, itemID, itemURL);
postMessage(cmItemStatus, message);
postUserMessage(cmItemStatus, userMessage);