commonMain.net.folivo.trixnity.client.room.message.mentions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trixnity-client-jvm Show documentation
Show all versions of trixnity-client-jvm Show documentation
Multiplatform Kotlin SDK for matrix-protocol
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)
}