Package plugins.Freetalk

Examples of plugins.Freetalk.Message


        }
        else if (desc.length() > 2 && desc.charAt(0) == '<' && desc.charAt(desc.length() - 1) == '>') {

          final String msgid = desc.substring(1, desc.length() - 1);
            try {
              final Message msg = mMessageManager.get(msgid);
              final ArrayList<FreetalkNNTPArticle> list = new ArrayList<FreetalkNNTPArticle>(2);
                list.add(new FreetalkNNTPArticle(msg));
                return list.iterator();
            }
            catch(NoSuchMessageException e) {
View Full Code Here


            }

            // TODO: Optimization: We don't need this lock probably, see Javadoc of postMessage
            synchronized(mMessageManager) {
                try {
                    Message parentMessage;
                    try {
                        parentMessage = mMessageManager.get(parser.getParentID());
                    }
                    catch (NoSuchFieldException e) {
                        parentMessage = null;
                    }
                    catch (NoSuchMessageException e) {
                        parentMessage = null;
                    }
                   
                  // FIXME: When replying to forked threads, this code will always sent the replies to the original thread. We need to find a way
                  // to figure out whether the user wanted to reply to a forked thread - does NNTP pass a thread ID?
                   
                    MessageURI parentMessageURI = null;
                    if (parentMessage != null) {
                        parentMessageURI = parentMessage.isThread() ? parentMessage.getURI() : parentMessage.getThreadURI();
                    }

                    final HashSet<String> boardSet = new HashSet<String>(parser.getBoards());
                    final OwnMessage message = mMessageManager.postMessage(parentMessageURI,
                        parentMessage, boardSet, parser.getReplyToBoard(), mAuthenticatedUser, parser.getTitle(), parser.getDate(), parser.getText(), null);
View Full Code Here

TOP

Related Classes of plugins.Freetalk.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.