Cannot Access Properties of iMessages Chats

Hi All:

I am trying to access the participants Property form the chat Class of iMessage and am getting an error message that I do not understand.

I therefore broke my code into the most basic of blocks with the block being as follows:


tell application "Messages"
	
	set myChats to chats
	
	
	-- Determine / extract the information to be displayed
	repeat with aChat in myChats
		
		set aParticpant to participants of aChat
		log aParticipant
		
	end repeat
	
end tell

The following is the error message:

While I am sure it is something obvious I am just missing it.

Would appreciate help in getting this sorted.

Thanks.

I am already logged into iMessage services on my Mac!

Alright, I was feeling stuck so I did more digging on this.

I moved from Apple’s Script Editor Script Debugger and when I dug into the Script Debugger’s Explorer view I got the following:

https://www.dropbox.com/s/6yq5hjzy3sqnfei/20211209_messaages_participant_screenshot.png?dl=0

  1. Is my understanding correct that the reason that this is facing is because the PARTICIPANT property is not accessible?

  2. And, if the answer is yes, then why (i.e. is it a bug, etc.)?

Thanks.

I suspect most of the properties have simply been disabled on security grounds.

Shane, I thank you for your response.

To be clear, and at the risk of asking what may be a naive question, you are inferring that the properties have been disabled by Apple, correct?

Thank you.

See my reply to your question in the Script Debugger forum. So in your case, probably a bug, as participants are visible in Monterey.

Shane, once again, thank you, greatly appreciated!

I will come back to you once I get my new MacBook and am up and running Monterey!