dfpc-coe / node-CoT

Javascript Cursor-On-Target Library
https://dfpc-coe.github.io/node-CoT/index.html
MIT License
13 stars 4 forks source link

event.detail.group vs event.detail.__group #41

Closed mrtnlrsn closed 1 month ago

mrtnlrsn commented 1 month ago

Hi Thank you again for the nice library and fast support.

There seems to be an error in handling of the group property. According to you typing it should be in __group, but it is actuall in group.

Probably because the protobuf field is named group while the xml specifies __group. I think __group would be the most correct, but as long as the types matches implementation I am happy.

Example:

 raw: {
    event: {
      _attributes: { ... },
      detail: {
        uid: { _attributes: { Droid: 'MILL' } },
        contact: { ... },
        group: { _attributes: Group { name: 'Cyan', role: 'Team Member' } },

References: https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/takproto/detail.proto https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/takcot/xsd/details/__group.xsd

ingalls commented 1 month ago

Good Catch! I'm fairly confident this is the fix, can you :eyes: and make sure that looks like what you are thinking? If so I'll merge and cut a release tomorrow

https://github.com/dfpc-coe/node-CoT/pull/43

mrtnlrsn commented 1 month ago

Good Catch! I'm fairly confident this is the fix, can you 👀 and make sure that looks like what you are thinking? If so I'll merge and cut a release tomorrow

43

Seems to work except for https://github.com/dfpc-coe/node-CoT/issues/44