The code takes in a long value but formats it as %u. This will truncate it to an integer and obviously fail the delete operation.
The formatting should use %lu, if at all we need to use a long value.
In Reality, the direct message ids are not even long but are long long values. So, the format should actually use %llu instead of %lu.
OR for simplicity, why not make it a NSString and save the pain of conversions?
The code takes in a long value but formats it as %u. This will truncate it to an integer and obviously fail the delete operation. The formatting should use %lu, if at all we need to use a long value. In Reality, the direct message ids are not even long but are long long values. So, the format should actually use %llu instead of %lu.
OR for simplicity, why not make it a NSString and save the pain of conversions?