diff --git a/repository/gob/repository.gob b/repository/gob/repository.gob index 8337ab5..beb0d9b 100644 Binary files a/repository/gob/repository.gob and b/repository/gob/repository.gob differ diff --git a/repository/main.go b/repository/main.go index 2982512..a5bda25 100644 --- a/repository/main.go +++ b/repository/main.go @@ -113,6 +113,7 @@ var Main = Packages{ AsserterMethod{ChildType: "Attributor"}, AsserterMethod{ChildType: "Codeblocker"}, AsserterMethod{ChildType: "Quoteblocker"}, + AsserterMethod{ChildType: "MessageReferencer"}, }, }, { Comment: Comment{` @@ -128,7 +129,7 @@ var Main = Packages{ Methods: []Method{ GetterMethod{ method: method{Name: "MessageID"}, - Returns: []NamedType{{Type: "cchat.ID"}}, + Returns: []NamedType{{Type: "string"}}, }, }, }, { diff --git a/text/text.go b/text/text.go index 816062b..4659b6f 100644 --- a/text/text.go +++ b/text/text.go @@ -11,8 +11,6 @@ // shouldn't be. package text -import cchat "cchat" - // Attribute is the type for basic rich text markup attributes. type Attribute uint32 @@ -147,7 +145,7 @@ type Mentioner interface { // and highlight it, though this is also for appearance, so the frontend may // decide in detail how to display it. type MessageReferencer interface { - MessageID() cchat.ID + MessageID() string } // Quoteblocker represents a quoteblock that behaves similarly to the blockquote @@ -172,12 +170,13 @@ type Segment interface { // Asserters. - AsColorer() Colorer // Optional - AsLinker() Linker // Optional - AsImager() Imager // Optional - AsAvatarer() Avatarer // Optional - AsMentioner() Mentioner // Optional - AsAttributor() Attributor // Optional - AsCodeblocker() Codeblocker // Optional - AsQuoteblocker() Quoteblocker // Optional + AsColorer() Colorer // Optional + AsLinker() Linker // Optional + AsImager() Imager // Optional + AsAvatarer() Avatarer // Optional + AsMentioner() Mentioner // Optional + AsAttributor() Attributor // Optional + AsCodeblocker() Codeblocker // Optional + AsQuoteblocker() Quoteblocker // Optional + AsMessageReferencer() MessageReferencer // Optional } diff --git a/utils/empty/empty.go b/utils/empty/empty.go index e2374d8..5649043 100644 --- a/utils/empty/empty.go +++ b/utils/empty/empty.go @@ -140,3 +140,6 @@ func (TextSegment) AsCodeblocker() text.Codeblocker { return nil } // AsQuoteblocker returns nil. func (TextSegment) AsQuoteblocker() text.Quoteblocker { return nil } + +// AsMessageReferencer returns nil. +func (TextSegment) AsMessageReferencer() text.MessageReferencer { return nil }