#Unread Message on Details screen of Pass...

1 messages · Page 1 of 1 (latest)

reef hamlet
#

@shell relic could you have a look at this?

gritty jasper
#

Another thought is that it might not be possible to use the batch method used in the REST examples with addMessage. However the passes are getting the messages correctly into the object AND i have tried to issue a pass with a message already in the object with no luck.

gritty jasper
#

Never mind, through DAYS of experimenting I finally got it working. And nowhere in the documentation was there any mention of the need for a dedicated slot in the detailsTemplateOverride.detailsItemInfos.

I had to add it like this:

const classTemplate = {
      id: classId,
      state: 'ACTIVE',
      messages: [],
      classTemplateInfo: {
        cardTemplateOverride: {
          cardRowTemplateInfos: this.generateCardRowTemplateInfos(design)
        },
        detailsTemplateOverride: {
          detailsItemInfos: [
      {
        item: {
          firstValue: {
            fields: [{ fieldPath: 'object.messages' }]
          }
        }
      },
{'rest of the fields here'}
    ]
        }
      }
    };

Someone at google should REALLY make the docs ALOT more clear on how to use the fieldPath strings. That part of it all is such a mystery wrapped in an enigma.

reef hamlet
#

@gritty jasper noted (the docs thing). we will take care

gritty jasper
#

@reef hamlet Thank you. alsoe please look at why the addMessage endpoint is ignoring the "end" part of the displayInterval when TEXT_AND_NOTIFY is used as messageType (when only TEXT is used it works as expected). Now I need to work around that by patching the pass to remove old messages before adding a new one to prevent message stacking.

reef hamlet
#

passing on to @shell relic

shell relic
#

@gritty jasper Trying to reproduce the bug here. Tried with an EventTicket and it seems to work. Which type of class are you using? GenericClass?