@social-mail/social-mail-web-server 1.5.411 → 1.5.415

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.5.411",
3
+ "version": "1.5.415",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -147,8 +147,14 @@ export default class Mailbox {
147
147
  @Column({ dataType: "Boolean", default: () => true })
148
148
  public nonMembersCanReact: boolean;
149
149
 
150
- @Column({ dataType: "Boolean", default: () => false })
151
- public requireApproval: boolean;
150
+ @Column({ dataType: "Boolean", default: () => true })
151
+ public requiresMembershipApproval: boolean;
152
+
153
+ @Column({ dataType: "Boolean", default: () => true })
154
+ public requiresPostModeration: boolean;
155
+
156
+ @Column({ dataType: "Boolean", default: () => true })
157
+ public requiresCommentModeration: boolean;
152
158
 
153
159
  @Column({ dataType: "Int", default: () => 0 })
154
160
  public subscriberCount: number;
@@ -19,7 +19,7 @@ export default class ChannelService {
19
19
 
20
20
  async getAccess(senderID: number, channel: Mailbox) {
21
21
 
22
- if (!channel.isPrivateChannel && !channel.requireApproval) {
22
+ if (!channel.isPrivateChannel && !channel.requiresMembershipApproval) {
23
23
  // we should accept everything...
24
24
  return { channel };
25
25
  }
@@ -83,7 +83,7 @@ export default class ChannelService {
83
83
  if (channel.isPrivateChannel) {
84
84
  throw new SmtpError("You must join the channel first.", SmtpStatusCodes.DeliveryNotPermitted);
85
85
  }
86
- if (channel.requireApproval) {
86
+ if (channel.requiresMembershipApproval) {
87
87
  const { email } = entity;
88
88
  if (/^(subscribe|join|follow|➕|🔔)/i.test(email.subject)) {
89
89
  // lets add the recipient...
@@ -39,7 +39,7 @@ export default class SendChannelInvitation extends Workflow<{ channelID: number,
39
39
 
40
40
  if (!mailbox.channelConfig?.inviteContent) {
41
41
 
42
- const approval = mailbox.requireApproval
42
+ const approval = mailbox.requiresMembershipApproval
43
43
  ? "This group requires approval, so you will receive notification when your membership is approved."
44
44
  : "";
45
45