MM-20681 Fix custom post types not marking channel unread when using Mark as Unread (#13247)
* MM-20681 Fix custom post types not marking channel unread when using Mark as Unread * Fix inverted if statements
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
df95748e86
Коммит
4a23d4b282
@@ -350,6 +350,19 @@ func (o *Post) IsSystemMessage() bool {
|
||||
return len(o.Type) >= len(POST_SYSTEM_MESSAGE_PREFIX) && o.Type[:len(POST_SYSTEM_MESSAGE_PREFIX)] == POST_SYSTEM_MESSAGE_PREFIX
|
||||
}
|
||||
|
||||
func (o *Post) IsJoinLeaveMessage() bool {
|
||||
return o.Type == POST_JOIN_LEAVE ||
|
||||
o.Type == POST_ADD_REMOVE ||
|
||||
o.Type == POST_JOIN_CHANNEL ||
|
||||
o.Type == POST_LEAVE_CHANNEL ||
|
||||
o.Type == POST_JOIN_TEAM ||
|
||||
o.Type == POST_LEAVE_TEAM ||
|
||||
o.Type == POST_ADD_TO_CHANNEL ||
|
||||
o.Type == POST_REMOVE_FROM_CHANNEL ||
|
||||
o.Type == POST_ADD_TO_TEAM ||
|
||||
o.Type == POST_REMOVE_FROM_TEAM
|
||||
}
|
||||
|
||||
func (p *Post) Patch(patch *PostPatch) {
|
||||
if patch.IsPinned != nil {
|
||||
p.IsPinned = *patch.IsPinned
|
||||
|
||||
Ссылка в новой задаче
Block a user