-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
Current Aviator status
This PR was closed without merging. If you still want to merge this PR, re-open it.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
) | ||
|
||
if lastMsgPreview != nil { | ||
preview, _, err = getChatMessageContentPreview(lastMsgPreview, noAttachments{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preview, _, err = getChatMessageContentPreview(lastMsgPreview, noAttachments{}) | |
preview, _, err = getChatMessageContentPreview(lastMsgPreview, nil) |
return str.Preview(content, 128), origSize, clues.Stack(err).OrNil() | ||
} | ||
|
||
func stripChatMessageHTML(msg models.ChatMessageable) (string, int64, error) { | ||
func stripChatMessageHTML(msg getBodyer, atts getAttachmentser) (string, int64, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func stripChatMessageHTML(msg getBodyer, atts getAttachmentser) (string, int64, error) { | |
func stripChatMessageHTML(msg getBodyer, atts []models.ChatMessageAttachmentable) (string, int64, error) | |
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
@@ -256,7 +272,7 @@ func stripChatMessageHTML(msg models.ChatMessageable) (string, int64, error) { | |||
|
|||
origSize = int64(len(content)) | |||
|
|||
content = replaceAttachmentMarkup(content, msg.GetAttachments()) | |||
content = replaceAttachmentMarkup(content, atts.GetAttachments()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
content = replaceAttachmentMarkup(content, atts.GetAttachments()) | |
content = replaceAttachmentMarkup(content, atts) |
@@ -162,7 +162,7 @@ func channelMessageInfo( | |||
modTime = lastReplyAt | |||
} | |||
|
|||
preview, contentLen, err := getChatMessageContentPreview(msg) | |||
preview, contentLen, err := getChatMessageContentPreview(msg, msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preview, contentLen, err := getChatMessageContentPreview(msg, msg) | |
preview, contentLen, err := getChatMessageContentPreview(msg, msg.GetAttachments()) |
@@ -180,7 +180,7 @@ func channelMessageInfo( | |||
var lr details.ChannelMessageInfo | |||
|
|||
if lastReply != nil { | |||
preview, contentLen, err = getChatMessageContentPreview(lastReply) | |||
preview, contentLen, err = getChatMessageContentPreview(lastReply, lastReply) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preview, contentLen, err = getChatMessageContentPreview(lastReply, lastReply) | |
preview, contentLen, err = getChatMessageContentPreview(lastReply, lastReply.GetAttachments()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I feel we do not need below (hence suggested changes):
// a hack for fulfilling getAttachmentser when the model doesn't
// provide GetAttachments()
type noAttachments struct{}
func (noAttachments) GetAttachments() []models.ChatMessageAttachmentable {
return []models.ChatMessageAttachmentable{}
}
type getAttachmentser interface {
GetAttachments() []models.ChatMessageAttachmentable
}
3c5dfe0
to
dfa9787
Compare
199b692
to
93de151
Compare
ba1ce0f
to
4146bff
Compare
once we're past kopia assits, the chat can download all of its messages and store them in the body uploded to kopia.
4cba773
to
316e5f0
Compare
details wasn't properly listing backed up items. This fixes the details display, and contains some code clean-up that occurred along the way.
Quality Gate passedIssues Measures |
once we're past kopia assits, the chat can
download all of its messages and store them in the body uploded to kopia.
Does this PR need a docs update or release note?
Type of change
Issue(s)
Test Plan