Esempio n. 1
0
		public ChatViewController (Conversation setConversation)
		{
			Conversation = setConversation;
			messages = new List<ChatMessage> ();

			msgSender = new MessageSender ();
			messages.AddRange (Conversation.CopyMessageCache());
		}
Esempio n. 2
0
        public static Conversation GetConversationForParticipants(string[] participantAddresses)
        {
            Conversation conv = FindConversationForParticipants (participantAddresses);
            if (conv != null)
                return conv;

            if (participantAddresses == null || participantAddresses.Length == 0)
                return null;

            conv = new Conversation (participantAddresses);
            conversations.Add (conv);

            Dictionary<string, object> vals = new Dictionary<string, object> {
                { "conversation.participants", conv.CopyParticipants() },
            };
            Document doc = database.CreateDocument ();
            doc.PutProperties (vals);
            return conv;
        }