INT-1636 updated Twitter documentation regarding 'target-user-expression'

This commit is contained in:
Oleg Zhurakousky
2010-12-10 16:20:28 -05:00
parent 2a456d9373
commit 4b33a4d4fa
2 changed files with 39 additions and 11 deletions

View File

@@ -60,9 +60,7 @@ public class DirectMessageSendingMessageHandler extends AbstractMessageHandler {
protected void handleMessageInternal(Message<?> message) throws Exception {
Assert.isInstanceOf(String.class, message.getPayload(), "Only payload of type String is supported. If your payload " +
"is not of type String consider adding a transformer to the message flow in front of this adapter.");
// Assert.isTrue(message.getHeaders().containsKey(TwitterHeaders.DM_TARGET_USER_ID),
// "the '" + TwitterHeaders.DM_TARGET_USER_ID + "' header is required");
Object toUser = targetUserExpression.getValue(this.evaluationContext, message);
Assert.isTrue(toUser instanceof String || toUser instanceof Integer,