Use WonMessage for messages loaded from the rdf store
@@ -335,6 +335,9 @@ export function showLatestMessages(connectionUri, numberOfEvents){
pagingSize: numOfEvts2pageSize(numberOfEvents),
deep: true
}
+ ).then(events =>
+ //convert each event to a WonMessage object
+ Promise.all(Object.keys(events).map(key => won.WonMessageFromMessageLoadedFromStore(events[key])))
)
.then(events =>
dispatch({
@@ -418,13 +421,15 @@ export function showMoreMessages(connectionUri, numberOfEvents) {
getEvents(
connectionUri,
{
- requesterWebId,
+ requesterWebId: needUri,
pagingSize: numOfEvts2pageSize(numberOfEvents),
deep: true,
resumebefore: eventHashValue,
}
- )
- .then(events =>
+ ).then(events =>
+ //convert each event to a WonMessage object
+ Promise.all(Object.keys(events).map(key => won.WonMessageFromMessageLoadedFromStore(events[key])))
+ ).then(events =>
dispatch({
type: actionTypes.connections.showMoreMessages,
payload: Immutable.fromJS({
