Reference Source
import Discussion from 'flarum/models/Discussion.js'
public class | source

Discussion

Method Summary

Public Methods
public

Get the Badge components that apply to this discussion.

public

Get a list of all of the post IDs in this discussion.

public

removePost(id: Integer)

Remove a post from the discussion's posts relationship.

public

unreadCount(): Integer

Get the estimated number of unread posts in this discussion for the current user.

Public Methods

public badges(): ItemList source

Get the Badge components that apply to this discussion.

Return:

ItemList

public postIds(): Array source

Get a list of all of the post IDs in this discussion.

Return:

Array

public removePost(id: Integer) source

Remove a post from the discussion's posts relationship.

Params:

NameTypeAttributeDescription
id Integer

The ID of the post to remove.

public unreadCount(): Integer source

Get the estimated number of unread posts in this discussion for the current user.

Return:

Integer