Skip to content

fix: Don't crash when updating media on an existing status#2230

Merged
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:saveToDirectory-crash
Apr 13, 2026
Merged

fix: Don't crash when updating media on an existing status#2230
nikclayton merged 1 commit into
pachli:mainfrom
nikclayton:saveToDirectory-crash

Conversation

@nikclayton

Copy link
Copy Markdown
Contributor

Previous code crashed because (simplified):

suspend fun URI.foo() = withContext(Dispatchers.IO) {
    println(scheme)
    println(toString())
}

resolves scheme from the URI but toString() from the coroutine context. So the wrong string was passed to Request.Builder().url().

Previous code crashed because (simplified):

```kotlin
suspend fun URI.foo() = withContext(Dispatchers.IO) {
    println(scheme)
    println(toString())
}
```

resolves `scheme` from the `URI` but `toString()` from the coroutine context.
So the wrong string was passed to `Request.Builder().url()`.
@nikclayton nikclayton merged commit 6f032de into pachli:main Apr 13, 2026
28 checks passed
@nikclayton nikclayton deleted the saveToDirectory-crash branch April 13, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant