@staticmethod
    def channel_poll(r, **attr):
        """
            Poll a Channel for new messages

            S3Method for interactive requests
        """

        tablename = r.tablename
        current.s3task.async("msg_poll", args=[tablename, r.record.channel_id])
        current.session.confirmation = \
            current.T("The poll request has been submitted, so new messages should appear shortly - refresh to see them")
        if tablename == "msg_email_channel":
            fn = "email_inbox"
        elif tablename == "msg_mcommons_channel":
            fn = "sms_inbox"
        elif tablename == "msg_rss_channel":
            fn = "rss"
        elif tablename == "msg_twilio_channel":
            fn = "sms_inbox"
        elif tablename == "msg_twitter_channel":
            fn = "twitter_inbox"
        else:
            return "Unsupported channel: %s" % tablename

        redirect(URL(f=fn))

# =============================================================================
dataset/ETHPy150Open sahana/eden/modules/s3db/msg.py/S3ChannelModel.channel_poll/original