1 var ChannelModule = require("./module");
2 var Flags = require("../flags");
4 function AnonymousPost(_channel) {
5 ChannelModule.apply(this, arguments);
8 AnonymousPost.prototype = Object.create(ChannelModule.prototype);
10 AnonymousPost.prototype.onUserPreJoin = function (user, data, cb) {
11 const opts = this.channel.modules.options;
12 var anonymousPosting = opts.get("allow_anon_chat");
13 user.guestLogin("Anonymous");
15 cb(null, ChannelModule.PASSTHROUGH);
19 module.exports = AnonymousPost;