add IrcCloud log importer.
This commit is contained in:
@@ -55,7 +55,12 @@ func (r *mutationResolver) ImportLog(ctx context.Context, input graphcore.LogImp
|
||||
tz = parsedTZ
|
||||
}
|
||||
|
||||
return r.s.Logs.Import(ctx, input.Importer, date, tz, input.ChannelName, input.Data)
|
||||
sessionThreshold := time.Hour * 12
|
||||
if input.SessionThresholdMs != nil {
|
||||
sessionThreshold = time.Duration(*input.SessionThresholdMs) * time.Millisecond
|
||||
}
|
||||
|
||||
return r.s.Logs.Import(ctx, input.Importer, date, tz, input.ChannelName, sessionThreshold, input.Data)
|
||||
}
|
||||
|
||||
func (r *mutationResolver) SplitLog(ctx context.Context, input graphcore.LogSplitInput) (*models.Log, error) {
|
||||
|
||||
@@ -132,6 +132,9 @@ input LogImportInput {
|
||||
"The date of the log, if not provided in the log body."
|
||||
date: Time
|
||||
|
||||
"Session threwhold"
|
||||
sessionThresholdMs: Int
|
||||
|
||||
"The log body itself."
|
||||
data: String!
|
||||
}
|
||||
@@ -171,4 +174,9 @@ enum LogImporter {
|
||||
Forum log: This importer parses the format on the forum. The displayed log, not the post source.
|
||||
"""
|
||||
ForumLog
|
||||
|
||||
"""
|
||||
IRCCloud: This importer parses irccloud exports.
|
||||
"""
|
||||
IrcCloud
|
||||
}
|
||||
Reference in New Issue
Block a user