Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 2ad8470

Browse files
authored
Merge pull request #138 from matthiasblaesing/fullclone-activity
Activity#clone did not consider fields textFormat, attachmentLayout, topicName, listenFor
2 parents ad8eb63 + 717d227 commit 2ad8470

File tree

1 file changed

+6
-0
lines changed
  • libraries/bot-schema/src/main/java/com/microsoft/bot/schema

1 file changed

+6
-0
lines changed

libraries/bot-schema/src/main/java/com/microsoft/bot/schema/Activity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,12 @@ public static Activity clone(Activity activity) {
372372
setExpiration(activity.getExpiration());
373373
setMembersAdded(ChannelAccount.cloneList(activity.getMembersAdded()));
374374
setMembersRemoved(ChannelAccount.cloneList(activity.getMembersRemoved()));
375+
setTextFormat(activity.getTextFormat());
376+
setAttachmentLayout(activity.getAttachmentLayout());
377+
setTopicName(activity.getTopicName());
378+
if (activity.getListenFor() != null) {
379+
setListenFor(new ArrayList<>(activity.getListenFor()));
380+
}
375381
}};
376382

377383
for (Map.Entry<String, JsonNode> entry : activity.getProperties().entrySet()) {

0 commit comments

Comments
 (0)