Ejemplo n.º 1
0
 public ExchangeConferenceRoomService(IMeetingRepository meetingRepository,
                                      ISecurityRepository securityRepository,
                                      IBroadcastService broadcastService,
                                      IDateTimeService dateTimeService,
                                      IMeetingCacheService meetingCacheService,
                                      IChangeNotificationService changeNotificationService,
                                      IExchangeServiceManager exchangeServiceManager,
                                      ISimpleTimedCache simpleTimedCache,
                                      IInstantMessagingService instantMessagingService,
                                      ISmsMessagingService smsMessagingService,
                                      ISmsAddressLookupService smsAddressLookupService,
                                      ISignatureService signatureService,
                                      IRoomRepository roomRepository)
 {
     _meetingRepository         = meetingRepository;
     _securityRepository        = securityRepository;
     _broadcastService          = broadcastService;
     _dateTimeService           = dateTimeService;
     _meetingCacheService       = meetingCacheService;
     _changeNotificationService = changeNotificationService;
     _exchangeServiceManager    = exchangeServiceManager;
     _simpleTimedCache          = simpleTimedCache;
     _instantMessagingService   = instantMessagingService;
     _smsMessagingService       = smsMessagingService;
     _smsAddressLookupService   = smsAddressLookupService;
     _signatureService          = signatureService;
     _roomRepository            = roomRepository;
     _ignoreFree             = bool.Parse(ConfigurationManager.AppSettings["ignoreFree"] ?? "false");
     _useChangeNotification  = bool.Parse(ConfigurationManager.AppSettings["useChangeNotification"] ?? "true");
     _impersonateForAllCalls = bool.Parse(ConfigurationManager.AppSettings["impersonateForAllCalls"] ?? "true");
     _emailDomains           = (ConfigurationManager.AppSettings["emailDomains"] ?? "")
                               .Split(';')
                               .Select(_ => _.StartsWith("@") ? _.ToLowerInvariant() : "@" + _.ToLowerInvariant())
                               .ToArray();
 }
Ejemplo n.º 2
0
 public MessageService(IRepositoryManager repositoryManager,
                       IUserService personInfoService,
                       IInstantMessagingService instantMessagingService)
 {
     _repositoryManager       = repositoryManager;
     _personInfoService       = personInfoService;
     _instantMessagingService = instantMessagingService;
 }
Ejemplo n.º 3
0
 public ChatController(IMessageService messageService,
                       IChatService chatService,
                       IInstantMessagingService instantMessagingService,
                       IMapper mapper)
 {
     _messageService          = messageService;
     _chatservice             = chatService;
     _mapper                  = mapper;
     _instantMessagingService = instantMessagingService;
 }
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service = service;
     m_imService = service.Registry.RequestModuleInterface<IInstantMessagingService>();
     if (m_imService != null)
     {
         service.AddStreamHandler("ChatSessionRequest",
                                  new GenericStreamHandler("POST", service.CreateCAPS("ChatSessionRequest", ""), ChatSessionRequest));
     }
 }
Ejemplo n.º 5
0
 public void RegisterCaps(IRegionClientCapsService service)
 {
     m_service   = service;
     m_imService = service.Registry.RequestModuleInterface <IInstantMessagingService>();
     if (m_imService != null)
     {
         service.AddStreamHandler("ChatSessionRequest",
                                  new GenericStreamHandler("POST", service.CreateCAPS("ChatSessionRequest", ""), ChatSessionRequest));
     }
 }
Ejemplo n.º 6
0
        public virtual void RegionLoaded(IScene scene)
        {
            if (!m_enabled)
            {
                return;
            }

            if (m_useMuteListModule)
            {
                MuteListConnector = Framework.Utilities.DataManager.RequestPlugin <IMuteListConnector>();
            }

            m_imService = scene.RequestModuleInterface <IInstantMessagingService>();
        }
        private void chatting(Object sender, IrcMessageEventArgs <TextMessage> e, UUID groupID)
        {
            IInstantMessagingService gMessaging = m_scene.RequestModuleInterface <IInstantMessagingService>();

            gMessaging.EnsureSessionIsStarted(groupID);
            gMessaging.SendChatToSession(UUID.Zero, new GridInstantMessage()
            {
                FromAgentID   = UUID.Random(),
                FromAgentName = e.Message.Sender.Nick,
                ToAgentID     = UUID.Zero,
                Dialog        = (byte)InstantMessageDialog.SessionSend,
                Message       = e.Message.Text,
                FromGroup     = false,
                SessionID     = UUID.Zero,
                Offline       = 0,
                BinaryBucket  = new byte[0],
                Timestamp     = (uint)Util.UnixTimeSinceEpoch()
            });
        }
Ejemplo n.º 8
0
        public void RegionLoaded(IScene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled)
                MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);

            m_groupData = WhiteCore.Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector>();

            // No Groups Service Connector, then nothing works...
            if (m_groupData == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                Close();
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
            m_imService = scene.RequestModuleInterface<IInstantMessagingService>();

            // No message transfer module, no notices, group invites, rejects, ejects, etc
            if (m_msgTransferModule == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get MessageTransferModule");
                Close();
                return;
            }

            m_scene = scene;

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;
            scene.EventManager.OnCachedUserInfo += UpdateCachedData;
            // The InstantMessageModule itself doesn't do this,
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;
        }
Ejemplo n.º 9
0
        public virtual void RegionLoaded(IScene scene)
        {
            if (!m_enabled) return;

            if (m_useMuteListModule)
                MuteListConnector = Framework.Utilities.DataManager.RequestPlugin<IMuteListConnector>();

            m_imService = scene.RequestModuleInterface<IInstantMessagingService>();
        }