提交 2aa1c4c2 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

code clean

上级 b13b7dec
......@@ -399,7 +399,7 @@ export class Contact implements Sayable {
* }
*/
public alias(newAlias?: string|null): Promise<boolean> | string | null {
log.silly('Contact', 'alias(%s)', newAlias || '')
// log.silly('Contact', 'alias(%s)', newAlias || '')
if (newAlias === undefined) {
return this.obj && this.obj.alias || null
......@@ -588,7 +588,7 @@ export class Contact implements Sayable {
* @private
*/
public async ready(contactGetter?: (id: string) => Promise<ContactRawObj>): Promise<this> {
log.silly('Contact', 'ready(' + (contactGetter ? typeof contactGetter : '') + ')')
// log.silly('Contact', 'ready(' + (contactGetter ? typeof contactGetter : '') + ')')
if (!this.id) {
const e = new Error('ready() call on an un-inited contact')
throw e
......
......@@ -878,6 +878,8 @@ export class MediaMessage extends Message {
* Get the read stream for attachment file
*/
public async readyStream(): Promise<Readable> {
log.verbose('MediaMessage', 'readyStream()')
if (this.filePath)
return fs.createReadStream(this.filePath)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册