             let isStarred = message.starred.contains(userId)
             let starMessage = isStarred ? localized("chat.message.actions.unstar") : localized("chat.message.actions.star")
             let star = UIAlertAction(title: starMessage, style: .default, handler: { (_) in
-                API.current()?.client(MessagesClient.self).starMessage(message, star: !isStarred)
+                client.starMessage(message, star: !isStarred)
             })
 
             actions.append(star)

    func actionsForMessage(_ message: Message, view: UIView) -> [UIAlertAction] {
        guard
            let messageUser = message.user,
            let auth = AuthManager.isAuthenticated()
        else {
            return []
        }

        if auth.canPinMessage(message) == .allowed {
            let pinMessage = message.pinned ? localized("chat.message.actions.unpin") : localized("chat.message.actions.pin")
            let pin = UIAlertAction(title: pinMessage, style: .default, handler: { (_) in
                client.pinMessage(message, pin: !message.pinned)
            })

            actions.append(pin)
