lex-microsoft_teams 0.6.31 → 0.6.32

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2cb9b484690573e09d2ba51b41fd68d9778411e4cae5107df637c5ba61aa0c77
4
- data.tar.gz: 5019f9a889aa838b72f8b0b0479b6940eab55172d9ce3664a051dd1cf39c7135
3
+ metadata.gz: 1bf9edc066d7d8d10aa994173883bb8e7fbb20847b2a1c1f3e2b296c918f4218
4
+ data.tar.gz: '08ea90ea1dd80f70aba0ad19ae2e1fc11428c9efd5ef4dce67b7c614c85d9a39'
5
5
  SHA512:
6
- metadata.gz: ebdafd3cd70fe3defb892dbee2a7ea98065c8bc0499df082da875086eff68007482c2caadbd68970a57b3bc017d4954dea4cfe196803dc3cc93f611f493663df
7
- data.tar.gz: 3a03664ceac7e263dad40a91a4ded1142538ea3b303e3cdcdf854dd7c65bc6316e5d7e947cddac29007522eb8393a5eacb0639ffb12313076c0b2ae70f12d0af
6
+ metadata.gz: 300418d851a4781ff29a11186680839f974b4397eddc750036d25ae8863d69940947046cce9f27c128ec56de4b238a34a8948085917ecbd069959911f5cfd4c6
7
+ data.tar.gz: a25c6c1ae3b1a9b9271012ef38bd955cf516bec679ba3f7608e13aa291e096b23b44ac78397f165267b09c6631d309be342ac8d34ef7b9656e6776b59cf24ec3
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.6.32] - 2026-03-31
6
+
7
+ ### Fixed
8
+ - `IncrementalSync` actor: renamed `delay` to `time` so `Concurrent::TimerTask` actually uses the configured interval — was firing every 1s instead of every 120s
9
+ - `DirectChatPoller` default interval increased from 5s to 15s to reduce Graph API pressure
10
+ - `Meeting` absorber: renamed `handle` to `absorb` to match `Absorbers::Base` contract — `handle` was never called by the dispatch framework
11
+
12
+ ### Added
13
+ - `Meeting` absorber: URL pattern for meeting chat links (`teams.microsoft.com/l/chat/19:meeting_**`) with chat thread resolution — extracts thread ID, fetches `onlineMeetingInfo.joinWebUrl` from the chat, then resolves the full meeting object
14
+
5
15
  ## [0.6.31] - 2026-03-31
6
16
 
7
17
  ### Fixed
@@ -4,12 +4,13 @@ module Legion
4
4
  module Extensions
5
5
  module MicrosoftTeams
6
6
  module Absorbers
7
- class Meeting < Legion::Extensions::Absorbers::Base # rubocop:disable Legion/Extension/AbsorberMissingAbsorbMethod
7
+ class Meeting < Legion::Extensions::Absorbers::Base
8
8
  pattern :url, 'teams.microsoft.com/l/meetup-join/*'
9
9
  pattern :url, '*.teams.microsoft.com/meet/*'
10
+ pattern :url, 'teams.microsoft.com/l/chat/19:meeting_**'
10
11
  description 'Absorbs Teams meeting transcripts, AI insights, and participants into Apollo'
11
12
 
12
- def handle(url: nil, content: nil, metadata: {}, context: {}) # rubocop:disable Lint/UnusedMethodArgument
13
+ def absorb(url: nil, content: nil, metadata: {}, context: {}) # rubocop:disable Lint/UnusedMethodArgument
13
14
  report_progress(message: 'resolving meeting from link')
14
15
  meeting = resolve_meeting(url)
15
16
  return { success: false, error: 'could not resolve meeting' } unless meeting
@@ -57,7 +58,43 @@ module Legion
57
58
  end
58
59
 
59
60
  def resolve_meeting(url)
61
+ thread_id = extract_meeting_thread_id(url)
62
+ if thread_id
63
+ report_progress(message: 'resolving meeting from chat thread', percent: 5)
64
+ return resolve_meeting_from_chat(thread_id)
65
+ end
66
+
60
67
  report_progress(message: 'looking up meeting by join URL', percent: 5)
68
+ resolve_meeting_by_join_url(url)
69
+ rescue StandardError => e
70
+ log.warn("Could not resolve meeting: #{e.message}")
71
+ nil
72
+ end
73
+
74
+ def extract_meeting_thread_id(url)
75
+ uri = URI.parse(url)
76
+ match = uri.path.match(%r{/l/chat/(19:meeting_[^/]+)})
77
+ match&.[](1)
78
+ rescue URI::InvalidURIError => e
79
+ log.debug("extract_meeting_thread_id: #{e.message}")
80
+ nil
81
+ end
82
+
83
+ def resolve_meeting_from_chat(thread_id)
84
+ chats_runner = Object.new.extend(Runners::Chats)
85
+ response = chats_runner.get_chat(chat_id: thread_id, token: graph_token)
86
+ body = response.is_a?(Hash) ? response[:result] : nil
87
+ return nil unless body.is_a?(Hash)
88
+
89
+ join_url = body.dig('onlineMeetingInfo', 'joinWebUrl') ||
90
+ body.dig(:onlineMeetingInfo, :joinWebUrl)
91
+ return resolve_meeting_by_join_url(join_url) if join_url
92
+
93
+ log.debug("Chat #{thread_id} has no onlineMeetingInfo, using chat metadata")
94
+ { 'id' => thread_id, 'subject' => body['topic'] || body[:topic] || 'meeting chat' }
95
+ end
96
+
97
+ def resolve_meeting_by_join_url(url)
61
98
  response = meetings_runner.get_meeting_by_join_url(join_url: url, token: graph_token)
62
99
  return nil unless response.is_a?(Hash)
63
100
 
@@ -68,9 +105,6 @@ module Legion
68
105
  return nil unless items.is_a?(Array) && !items.empty?
69
106
 
70
107
  items.first
71
- rescue StandardError => e
72
- log.warn("Could not resolve meeting: #{e.message}")
73
- nil
74
108
  end
75
109
 
76
110
  def ingest_transcript(meeting_id, subject, results)
@@ -8,7 +8,7 @@ module Legion
8
8
  include Legion::Extensions::MicrosoftTeams::Helpers::Client
9
9
  include Legion::Extensions::MicrosoftTeams::Helpers::HighWaterMark
10
10
 
11
- POLL_INTERVAL = 5
11
+ POLL_INTERVAL = 15
12
12
 
13
13
  def initialize(**opts)
14
14
  return unless enabled?
@@ -12,14 +12,14 @@ module Legion
12
12
  def generate_task? = false
13
13
  def run_now? = false
14
14
 
15
- def delay
15
+ def time
16
16
  settings = begin
17
17
  Legion::Settings[:microsoft_teams] || {}
18
18
  rescue StandardError => e
19
- log.debug("IncrementalSync#delay: #{e.message}")
19
+ log.debug("IncrementalSync#time: #{e.message}")
20
20
  {}
21
21
  end
22
- settings.dig(:ingest, :incremental_interval) || 900
22
+ settings.dig(:ingest, :incremental_interval) || 120
23
23
  end
24
24
 
25
25
  def enabled?
@@ -3,7 +3,7 @@
3
3
  module Legion
4
4
  module Extensions
5
5
  module MicrosoftTeams
6
- VERSION = '0.6.31'
6
+ VERSION = '0.6.32'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-microsoft_teams
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.31
4
+ version: 0.6.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity