belongsTo

fun belongsTo(message: BaseMessage?, user: User?): Boolean

Checks whether the sender's userId of the BaseMessage equals the given user's id.

Return

whether the message is sent by the user with userId. Returns false if user or message is null.

Since

3.0.137

Parameters

message

BaseMessage to check user.

user

User to check. Returns false if user is null.


fun belongsTo(message: BaseMessage?, userId: String): Boolean

Checks whether the sender's userId of the BaseMessage equals the given userId.

Return

whether the message is sent by the user with userId. Returns false if userId is null or empty or message is null.

Since

3.0.124

Parameters

message

BaseMessage to check userId.

userId

UserId to check. Returns false if userId is null or empty.