All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.net.folivo.trixnity.client.room.message.mentions.kt Maven / Gradle / Ivy

There is a newer version: 4.7.1
Show newest version
package net.folivo.trixnity.client.room.message

import net.folivo.trixnity.core.model.UserId
import net.folivo.trixnity.core.model.events.m.Mentions

fun MessageBuilder.mentionsRoom() = mentions(room = true)
fun MessageBuilder.mentions(vararg users: UserId, room: Boolean? = mentions?.room) = mentions(users.toSet(), room)

/**
 * Add mentions to the message. Can be called multiple times and adds new mentions each time.
 */
fun MessageBuilder.mentions(
    users: Set? = null,
    room: Boolean? = mentions?.room,
) {
    mentions += Mentions(users, room)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy