slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
568 stars 210 forks source link

entity.message is missing in Audit Logs API response #1311

Closed EnricoVoss closed 2 months ago

EnricoVoss commented 2 months ago

When using the message_flagged API call in Java with Slack SDK 1.39.0, I am missing the message section in the entity section containing channel, name and timestamp entries.

This is the response i get. LogsResponse.Entry(id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, dateCreate=1687182032, action=message_flagged, actor=LogsResponse.Actor(type=user, user=LogsResponse.User(id=UXXXXXXX, name=first last", email=first.last@mail.com", team=EXXXXXXXXX)), entity=LogsResponse.Entity(type=message, app=null, user=null, usergroup=null, workspace=null, enterprise=null, file=null, channel=null, huddle=null, role=null, accountTypeRole=null, workflow=null, barrier=null, workflowV2=null), context=LogsResponse.Context(sessionId=XXXXXXXXXXX, location=LogsResponse.Location(type=enterprise, id=EXXXXXXXXX, name= Test Env, domain=sandbox), ua=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36, ipAddress=XXX.XXX.XXX.XXX, app=null), details=null)

seratch commented 2 months ago

Hi @EnricoVoss, thank you so much for reporting this issue! We will resolve it and release a new patch version including the fix.

Let me paste the payload exmaple you've shared in the community workspace:

{
  "action": "message_flagged",
  "actor": {
    "type": "user",
    "user": {
      "email": "first.last@test.verizon.com",
      "id": "UXXXXXXX",
      "name": "first last",
      "team": "EXXXXXXXXX"
    }
  },
  "context": {
    "ip_address": "XXX.XXX.XXX.XXX",
    "location": {
      "domain": "verizon-sandbox",
      "id": "EXXXXXXXXX",
      "name": "Verizon Org Test Env",
      "type": "enterprise"
    },
    "session_id": "XXXXXXXXXXX",
    "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
  },
  "date_create": 1687182032,
  "entity": {
    "message": {
      "channel": "CXXXXXXXXX",
      "team": "EXXXXXXXXX",
      "timestamp": "1687181979.191639"
    },
    "type": "message"
  },
  "id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}