예제 #1
0
        public async Task AddMessage(ChadderMessage msg, ChadderConversation conversation)
        {
            conversation.Messages.Add(msg);
            await sqlDB.InsertAsync(msg);

            conversation.Hidden = false;
            await sqlDB.UpdateAsync(conversation);
        }
예제 #2
0
        public async Task DeleteMessage(ChadderMessage msg, ChadderConversation conversation)
        {
            if (msg.Type == ChadderMessage.MESSAGE_TYPE.PICTURE)
            {
                await DeletePicture(msg.Picture);
            }
            await sqlDB.DeleteAsync(msg);

            conversation.Messages.Remove(msg);
        }