use of im.actor.core.api.updates.UpdateMessage in project actor-platform by actorapp.
the class MessagesProcessor method onDifferenceMessages.
@Verified
public Promise<Void> onDifferenceMessages(ApiPeer _peer, List<UpdateMessage> messages) {
Peer peer = convert(_peer);
ArrayList<Message> nMessages = new ArrayList<>();
for (UpdateMessage u : messages) {
AbsContent msgContent = AbsContent.fromMessage(u.getMessage());
nMessages.add(new Message(u.getRid(), u.getDate(), u.getDate(), u.getSenderUid(), myUid() == u.getSenderUid() ? MessageState.SENT : MessageState.UNKNOWN, msgContent));
}
return context().getMessagesModule().getRouter().onNewMessages(peer, nMessages);
}
Aggregations