When might a direct_message_events array contain more than one item?

webhooks

#1

Documentation says:

Callback requests contain an array of events called direct_message_events.

During testing I have only ever seen a single item in the array. Can someone please explain the conditions that would lead to there being more than one item in this array?

I know that group direct messages are not included in the public API and therefore do not generate an event, so I know it’s not this.

Thanks,

SJ


#2

I don’t know of any conditions that are possible right now. They likely have it in this form to leave open the possibility of that changing in the future. It seems as if there’s a lot of new stuff coming fro devs in the near future, maybe this is related.


#3

Yes indeed, as this is still a beta API this is leaving the option open for additional data to be enclosed in the array in future (and as a signal to be flexible in your code rather than hard-coding assumptions early on).