[SIS-6] adding ability to declare "no_time" for a meetup

adding meetup id to meetup message
refactoring meetup cancellation to be a command
adding command to change the meetup time and notify meetup members
fixing meetup components not being cleaned when cancelling or cleaning up
changing label for no button
This commit is contained in:
Sheldan
2022-07-17 18:34:06 +02:00
parent f688a066b4
commit 48e2e705c2
60 changed files with 1099 additions and 57 deletions

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "cancelMeetup_response_text"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -2,7 +2,7 @@
{
"embeds": [
{
<#include "abstracto_color">,
<#include "abstracto_color">,
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
<#assign topicText>${topic?json_string}</#assign>
"description": "<#include "meetup_cancel_notification_description">"

View File

@@ -0,0 +1,25 @@
<#include "format_instant">
{
"embeds": [
{
<#include "abstracto_color">,
"title": {
"title": "${topic?json_string}"
},
"description": "<@format_instant_date_time instant=meetupTime/>
${description?json_string}"
}
],
"buttons": [
{
"label": "<@safe_include "createMeetup_confirm_button_label"/>",
"id": "${confirmationId}",
"buttonStyle": "success"
},
{
"label": "<@safe_include "createMeetup_cancel_button_label"/>",
"id": "${cancelId}",
"buttonStyle": "danger"
}
]
}

View File

@@ -0,0 +1,13 @@
<#include "format_instant">
{
"embeds": [
{
<#include "abstracto_color">,
<#assign topicText=meetupTopic>
<#assign oldTime><@format_instant_date_time instant=oldDate/></#assign>
<#assign newTime><@format_instant_date_time instant=newDate/></#assign>
<#assign messageLink=meetupMessage.jumpUrl>
"description": "<@safe_include "changeMeetupTime_notification_text"/>"
}
]
}

View File

@@ -0,0 +1,5 @@
{
<#assign userMentions><#list participants as user>${user.memberMention}<#sep>, </#list></#assign>
"additionalMessage": "${userMentions?json_string}
${notificationMessage}"
}

View File

@@ -0,0 +1,6 @@
{
"additionalMessage": "<@safe_include "notifyMeetupParticipants_response_text"/>",
"messageConfig": {
"ephemeral": true
}
}

View File

@@ -0,0 +1 @@
<#include "meetup_not_organizer_exception_message">

View File

@@ -6,16 +6,18 @@
{
<#include "abstracto_color">,
"title": {
"title": "${topic?json_string}"
"title": "${topic?json_string} - <@safe_include "meetup_message_id_display"/>"
},
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
<#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign>
<#assign organizerText>${organizer.memberMention}</#assign>
<#assign meetupId=meetupId/>
<#assign descriptionText>${description?json_string}</#assign>
<#assign participantsText> (${participants?size}) <#list participants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign maybeParticipantsText> (${maybeParticipants?size}) <#list maybeParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign noTimeParticipantsText> (${noTimeParticipants?size}) <#list noTimeParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign declinedParticipantsText> (${declinedParticipants?size}) <#list declinedParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
"description": "<#if cancelled>~~</#if><#include "meetup_display_description"><#if cancelled>~~</#if>"
"description": "<#if cancelled>~~</#if><@safe_include "meetup_display_description"/><#if cancelled>~~</#if>"
}
],
<#if yesId?has_content && noId?has_content && maybeId?has_content && !cancelled>
@@ -31,13 +33,13 @@
"buttonStyle": "secondary"
},
{
"label": "<@safe_include "meetup_message_no_button_label"/>",
"id": "${noId}",
"label": "<@safe_include "meetup_message_no_time_button_label"/>",
"id": "${noTimeId}",
"buttonStyle": "danger"
},
{
"label": "<@safe_include "meetup_message_cancel_button_label"/>",
"id": "${cancelId}",
"label": "<@safe_include "meetup_message_no_button_label"/>",
"id": "${noId}",
"buttonStyle": "danger"
}
],

View File

@@ -0,0 +1,3 @@
This command is used to cancel a meetup.
This includes notifying all current participants, who either said yes or maybe, that the meetup has been cancelled and updating the message to reflect this.
Cancelled meetups are deleted after one to two days completely.

View File

@@ -0,0 +1,2 @@
Meetup with topic ${topicText} has been moved from ${oldTime} to ${newTime}.
Your response has been removed, please click [here](${messageLink}) to respond again.

View File

@@ -0,0 +1,3 @@
This command is used to change the time of a meetup.
This includes notifying all current participants, who either said yes, maybe or no time, that the time of the meetup has changed.
All previous responses are deleted (except no) and the message is updated accordingly.

View File

@@ -0,0 +1,2 @@
This command is used to notify all participants of a meetup.
This means every participant will get mentioned and the message will be sent.

View File

@@ -6,4 +6,6 @@ Participants: ${participantsText}
Maybe: ${maybeParticipantsText}
Declined: ${declinedParticipantsText}
Declined: ${declinedParticipantsText}
No time: ${noTimeParticipantsText}