+ public void revoke(Group toMod) {
+ target.revokeGroup(supporter, toMod);
+ }
+
+ private static final MailTemplate supportNotification = new MailTemplate(SupportedUser.class.getResource("SupportNotificationMail.templ"));
+
+ public void sendSupportNotification(String subject, Outputable message) {
+ try {
+ HashMap<String, Object> vars = new HashMap<>();
+ vars.put("supporter", supporter.getPreferredName().toString());
+ vars.put("action", message);
+ vars.put("ticket", this.getTicket());
+ vars.put("subject", subject);
+
+ String supportemailaddress = ServerConstants.getSupportMailAddress();
+ supportNotification.sendMail(Language.getInstance(Locale.ENGLISH), vars, supportemailaddress);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private static final MailTemplate supportUserNotification = new MailTemplate(SupportedUser.class.getResource("SupportUserNotificationMail.templ"));
+
+ public void sendSupportUserNotification(String subject, Outputable message) {
+ try {
+ HashMap<String, Object> vars = new HashMap<>();
+ vars.put("action", message);
+ vars.put("ticket", this.getTicket());
+ vars.put("subject", subject);
+
+ supportUserNotification.sendMail(Language.getInstance(Locale.ENGLISH), vars, target.getEmail());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }