Rather than send a plain message containing the list of registered users, look into creating a rich message containing Slack Block Kit elements. This way we can possibly include the user @ mentions in the message (and anything else we might come up with).
If possible, add a late registration button straight into the message block?
Update: Now that multiple premises exist, update wording and formatting of registration lists in scheduled messages.
If scheduled message is subscribed to a channel with a specific office argument, the message formatting should be like: "Tänään toimistolla 'Helsinki 🏙 ' ovat:\n {list of helsinki registrations}"-
If scheduled message is subscibed without any office argument, which means that the message should contain registrations from all offices, the formatting should look something like: "Tänään toimistoilla ovat...\n Helsinki 🏙\n {list of helsinki registrations} \n Tampere 🌆\n {list of tampere registrations}" Or just send a separate message for each office...
Using blocks instead of regular plain-text messages, didn't bring much value beside making the code more complex. It didn't solve the issue with @ handles sending notifications to user. Adding a late registration button to the message also wasn't a good feature, because you cannot personalize the button for each user (they would all see the same button with the same state regardless of whether they have already registered). The only value I saw was that we could include a header in the message with the name of the office and emoji, however, that just felt like I was trying to find something to justify the change to blocks (sunk cost fallacy).
Subscribing the scheduled message without an office argument is a rare use case and it proved to be harder to implement than one would think. I approached it by sending separate messages for each office, which in and of itself worked, but it obviously broke late registration because currently it only fetches the latest scheduled message sent to each channel and updates that. This could be solved by adding an office field to the scheduledMessages table and updating every message for the current date.
Rather than send a plain message containing the list of registered users, look into creating a rich message containing Slack Block Kit elements.
This way we can possibly include the user @ mentions in the message(and anything else we might come up with).If possible, add a late registration button straight into the message block?
See: Creating rich message layouts
Update: Now that multiple premises exist, update wording and formatting of registration lists in scheduled messages.