         guard let url = URL(string: userPageUrlString) else { return }
         NSWorkspace.shared.open(url)
     }
+}
 
-    // MARK: - Internal Functions
+private extension MenuDelegate {
+    func resetMenu() {}
+    func configureMenu(_ chat: Chat) {}
+
     func copyStringToPasteBoard(_ string: String) -> Bool {
-        return true
-        // TODO: update for swift 4
-        /*
-         let pasteBoard = NSPasteboard.general
-         pasteBoard.declareTypes(convertToNSPasteboardPasteboardTypeArray([NSStringPboardType.rawValue]), owner: nil)
-         let result = pasteBoard.setString(string, forType: convertToNSPasteboardPasteboardType(NSStringPboardType.rawValue))
-         log.debug("copied \(string) w/ result \(result)")
-
-         return result
-         */
+        let pasteBoard = NSPasteboard.general
+        pasteBoard.clearContents()
+        let result = pasteBoard.setString(string, forType: .string)
+        log.debug("copied \(string) w/ result \(result)")
+        return result
     }
 }
-
-// Helper function inserted by Swift 4.2 migrator.
-private func convertToNSPasteboardPasteboardTypeArray(_ input: [String]) -> [NSPasteboard.PasteboardType] {
-    return input.map { key in NSPasteboard.PasteboardType(key) }
-}
-
-// Helper function inserted by Swift 4.2 migrator.
-private func convertToNSPasteboardPasteboardType(_ input: String) -> NSPasteboard.PasteboardType {
-    return NSPasteboard.PasteboardType(rawValue: input)
-}

    @IBOutlet weak var openUserPageMenuItem: NSMenuItem!

    // MARK: Computed Properties
    var tableView: NSTableView {
        return MainViewController.shared.tableView
    }

    var live: Live? {
        return MainViewController.shared.live
    }

    // MARK: - Object Lifecycle
    override func awakeFromNib() {
        super.awakeFromNib()
    }

    // MARK: - NSMenu Overrides
    // swiftlint:disable cyclomatic_complexity
    func validateMenuItem(_ menuItem: NSMenuItem) -> Bool {
        let clickedRow = tableView.clickedRow
        if clickedRow == -1 {
            return false
        }

        let message = MessageContainer.sharedContainer[clickedRow]
        guard message.messageType == .chat, let chat = message.chat else { return false }


        let status = "「\(comment)」/ \(liveName) (\(communityName)) \(liveUrl) #\(communityId)"

        let service = NSSharingService(named: .postOnTwitter)
        service?.delegate = self
        service?.perform(withItems: [status])
    }

