`set_expiration` messages are sometimes not sticky

i am encountering the following unexpected behavior from the set_expiry command:

  • given: an ongoing conversation between (already-registered) username and recipientNumber with expiration set (by recipientNumber to 0 seconds (ie: off)
  • when: my application sends a set_expiration message to set the disappearing message timer to one minute in the following format:
{ type: 'set_expiration', username: '...', recipientNumber: '...', expiresInSeconds: '60' }
  • then: both devices (username and recipientNumber) observe a message that says " set the disappearing message timer to one minute"
  • but then: depending on who sends the very next message, the expiry time is either sticky or reverts back to 0 (off)
    • if the recipientNumber sends the first message after the disappearing message timer has been set to 60, then all subsequent messages in the conversation observe that new timer value (of 60)
    • however, if username sends the first message after the disappearing message (programmatically, using signald-formatted JSON message of type send), then the timer is reset to 0. both devices observe a message that says " disabled disappearing messages" followed by the body of whatever message was just sent by username. all subsequent messages in the conversation use the timer value of 0 (ie: "off")

to summarize:

  • if the recipient sends the first message after the timer change, the timer change is sticky. if the username sends the first message, the timer reverts to whatever it as before username requested the timer change.
  • this discrepancy occurs no matter what the original timer value was. (ie: it is not important that the original timer value in my example was 0. the same thing occurs changing the timer value from 30 to 60 or 60 to 300, etc...)