Example #1
0
        private void Init()
        {
            _currentUser     = UserControler.GetProfile(this);
            _channels        = new List <Channel>();
            _users           = new List <Member>();
            _currentMessages = new List <SlackMessage>();

            _slackRtm          = new SlackRtm();
            _slackRtm.OnEvent += Instance_OnEvent1;
            _slackRtm.OnAck   += Instance_OnAck;

            LoadData();
        }
Example #2
0
        public void InitRtm()
        {
            if (_slackRtm != null)
            {
                _slackRtm.OnEvent -= Instance_OnEvent1;
                _slackRtm.OnAck   -= Instance_OnAck;
            }

            if (_currentToken != null)
            {
                _slackRtm          = new SlackRtm(_currentToken.Key);
                _slackRtm.OnEvent += Instance_OnEvent1;
                _slackRtm.OnAck   += Instance_OnAck;
                _slackRtm.Connect();
            }
        }
 public SlackJsonConverter(SlackRtm slackRtm)
 {
     this.slackRtm = slackRtm;
 }