package com.ematou.wxservice.mp.handler;

import com.ematou.wxservice.mp.message.WeChatMessage;
import com.ematou.wxservice.mp.message.WeChatMpXmlOutImageMessage;
import com.ematou.wxservice.mp.message.WeChatMpXmlOutMessage;
import org.springframework.stereotype.Component;

@Component
public class WeChatImageMessageHandler implements WeChatMessageHandler {

    @Override
    public WeChatMpXmlOutMessage handlerMessage(WeChatMessage weChatMessage) {


            WeChatMpXmlOutImageMessage m = WeChatMpXmlOutMessage.IMAGE()
                                                        .mediaId(weChatMessage.getMediaId())
                                                        .fromUser(weChatMessage.getToUser())
                                                        .toUser(weChatMessage.getFromUser())
                                                        .build();
            return m;


    }

}
