@microsoft/teamsfx 0.7.1-beta.7f6aaca97.0 → 0.7.1-beta.86404c812.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1931,6 +1931,11 @@ class NotificationMiddleware {
1931
1931
  await this.conversationReferenceStore.set(reference);
1932
1932
  break;
1933
1933
  }
1934
+ case ActivityType.CurrentBotMessaged: {
1935
+ const reference = TurnContext.getConversationReference(context.activity);
1936
+ await this.tryAddMessagedReference(reference);
1937
+ break;
1938
+ }
1934
1939
  case ActivityType.CurrentBotUninstalled:
1935
1940
  case ActivityType.TeamDeleted: {
1936
1941
  const reference = TurnContext.getConversationReference(context.activity);
@@ -1961,8 +1966,20 @@ class NotificationMiddleware {
1961
1966
  return ActivityType.TeamRestored;
1962
1967
  }
1963
1968
  }
1969
+ else if (activityType === "message") {
1970
+ return ActivityType.CurrentBotMessaged;
1971
+ }
1964
1972
  return ActivityType.Unknown;
1965
1973
  }
1974
+ async tryAddMessagedReference(reference) {
1975
+ var _a;
1976
+ const conversationType = (_a = reference === null || reference === void 0 ? void 0 : reference.conversation) === null || _a === void 0 ? void 0 : _a.conversationType;
1977
+ if (conversationType === "personal" || conversationType === "groupChat") {
1978
+ if (!(await this.conversationReferenceStore.check(reference))) {
1979
+ await this.conversationReferenceStore.set(reference);
1980
+ }
1981
+ }
1982
+ }
1966
1983
  }
1967
1984
  class CommandResponseMiddleware {
1968
1985
  constructor(handlers) {