For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvote
Accepted
15 0 0 1

hasPermissionData()

Hi,


Inside OnRefreshMsge() and OnUpdateMsg() I check if item has permission data by calling


message.hasPermissionData().


For the same item hasPermissionData() gives me TRUE if i'm inside a Refresh Message and FALSE if i'm inside an Update Message.


Is it normal? I'm struggling to understand why?


Thank you

elektronrrtema-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvote
Accepted
16.7k 42 12 19

Hi @yolufudo,

Yes, this is normal. The permission data is an optional field of Refresh and Update messages. Once this data is provided to an application in the Refresh message, there is no need to provide it again in update message, if the permissionable entity (PE) hasn't changed. This is very similar to how update messages only carry the fields which have changed since the last Refresh or Update.

Here us the snippet from the EMA documentation:

1664284966953.png



1664284966953.png (5.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.