@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/dist/server/model/entities/Mailbox.d.ts +3 -1
- package/dist/server/model/entities/Mailbox.d.ts.map +1 -1
- package/dist/server/model/entities/Mailbox.js +10 -2
- package/dist/server/model/entities/Mailbox.js.map +1 -1
- package/dist/server/smtp/services/ChannelService.js +2 -2
- package/dist/server/smtp/services/ChannelService.js.map +1 -1
- package/dist/server/workflows/channel/invite/SendChannelInvitation.js +1 -1
- package/dist/server/workflows/channel/invite/SendChannelInvitation.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/model/entities/Mailbox.ts +8 -2
- package/src/server/smtp/services/ChannelService.ts +2 -2
- package/src/server/workflows/channel/invite/SendChannelInvitation.ts +1 -1
package/package.json
CHANGED
|
@@ -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: () =>
|
|
151
|
-
public
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|