`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)
usernameandrecipientNumberwith expiration set (byrecipientNumberto 0 seconds (ie: off) -
when: my application sends a
set_expirationmessage 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
recipientNumbersends 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
usernamesends the first message after the disappearing message (programmatically, using signald-formatted JSON message of typesend), 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 byusername. all subsequent messages in the conversation use the timer value of 0 (ie: "off")
- if the
to summarize:
- if the recipient sends the first message after the timer change, the timer change is sticky. if the
usernamesends the first message, the timer reverts to whatever it as beforeusernamerequested 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...)