Skip to content

Commit

Permalink
fix details when nothing found for userid
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Germain committed Feb 20, 2024
1 parent 0fe2add commit ae0ccdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion huginn_roblox_agent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = "huginn_roblox_agent"
spec.version = '0.1.12'
spec.version = '0.1.13'
spec.authors = ["Nicolas Germain"]
spec.email = ["ngermain@hihouhou.com"]

Expand Down
4 changes: 4 additions & 0 deletions lib/huginn_roblox_agent/roblox_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ def check_conversations()
log line
date2 = DateTime.parse(line['sent'])
userid = conversation['participants'].find { |p| p['targetId'] == line['senderTargetId'] }
if userid.nil?
userid = {}
userid['name'] = "unknown"
end
newline = "#{line['sent']} #{userid['name']} : #{line['content']}"
if date1 < date2
conversation['details_content'] << newline
Expand Down

0 comments on commit ae0ccdc

Please sign in to comment.