Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# 363 Error message through in 9.x if you send IM message #364

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;
import java.util.Map;

import com.symphony.bdk.gen.api.model.StreamType;
import org.finos.springbot.entityjson.EntityJson;
import org.finos.springbot.symphony.conversations.SymphonyConversations;
import org.finos.springbot.workflow.actions.Action;
Expand Down Expand Up @@ -66,7 +67,10 @@ public void accept(RealTimeEvent<V4SymphonyElementsAction> event) {
}

EntityJson data = retrieveData(action.getFormMessageId());
Addressable rr = ruBuilder.loadRoomById(action.getStream().getStreamId());
Addressable rr = null;
if(action.getStream().getStreamType().equals(StreamType.TypeEnum.ROOM.name())) {
rr = ruBuilder.loadRoomById(action.getStream().getStreamId());
}
User u = ruBuilder.loadUserById(event.getInitiator().getUser().getUserId());

// if we're not in a room, address the user directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import com.symphony.bdk.gen.api.model.StreamType;
import org.finos.springbot.entityjson.EntityJson;
import org.finos.springbot.symphony.content.serialization.MessageMLParser;
import org.finos.springbot.symphony.conversations.SymphonyConversations;
Expand Down Expand Up @@ -51,7 +52,10 @@ public void onApplicationEvent(RealTimeEvent<V4MessageSent> t) {

EntityJson ej = jsonConverter.readValue(ms.getMessage().getData());
Message words = messageParser.apply(ms.getMessage().getMessage(), ej);
Addressable rr = ruBuilder.loadRoomById(ms.getMessage().getStream().getStreamId());
Addressable rr = null;
if(ms.getMessage().getStream().getStreamType().equals(StreamType.TypeEnum.ROOM.name())) {
rr = ruBuilder.loadRoomById(ms.getMessage().getStream().getStreamId());
}
User u = ruBuilder.loadUserById(ms.getMessage().getUser().getUserId());

// TODO: multi-user chat (not room)
Expand Down