@@ -68,7 +68,12 @@ export class ContextService {
6868 this . setHtmlBody ( data . body . view . value , loadAsDocument ) ;
6969 this . setAuthor ( data . history . createdBy . displayName ) ;
7070 this . setEmail ( data . history . createdBy . email ) ;
71- this . setAvatar ( `${ baseHost } ${ basePath } /${ data . history . createdBy . profilePicture . path . replace ( / ^ \/ w i k i / , 'wiki' ) } ` )
71+ this . setAvatar (
72+ `${ baseHost } ${ basePath } /${ data . history . createdBy . profilePicture . path . replace (
73+ / ^ \/ w i k i / ,
74+ 'wiki' ,
75+ ) } `,
76+ ) ;
7277 this . setWhen ( data . history . createdDate ) ;
7378 this . setLabels ( data . metadata . labels . results ) ;
7479
@@ -79,9 +84,9 @@ export class ContextService {
7984 modificationBy : {
8085 displayName : data . history . createdBy . displayName ,
8186 email : data . history . createdBy . email ,
82- profilePicture : this . getAvatar ( )
83- }
84- }
87+ profilePicture : this . getAvatar ( ) ,
88+ } ,
89+ } ;
8590 this . setCreatedVersion ( createdBy ) ;
8691
8792 const modifiedBy : Version = {
@@ -91,10 +96,13 @@ export class ContextService {
9196 modificationBy : {
9297 displayName : data . version . by . publicName ,
9398 email : data . version . by . email ,
94- profilePicture : `${ baseHost } ${ basePath } /${ data . version . by . profilePicture ?. path . replace ( / ^ \/ w i k i / , 'wiki' ) } ` ,
95- }
96- }
97- this . setlastVersion ( modifiedBy ) ;
99+ profilePicture : `${ baseHost } ${ basePath } /${ data . version . by . profilePicture ?. path . replace (
100+ / ^ \/ w i k i / ,
101+ 'wiki' ,
102+ ) } `,
103+ } ,
104+ } ;
105+ this . setLastVersion ( modifiedBy ) ;
98106
99107 if (
100108 data . metadata ?. properties [ 'content-appearance-published' ] &&
@@ -146,14 +154,6 @@ export class ContextService {
146154 this . title = title ;
147155 }
148156
149- // getVersion(): Version {
150- // return this.version;
151- // }
152-
153- // setVersion(version: Version): void {
154- // this.version = version;
155- // }
156-
157157 getCreatedVersion ( ) : Version {
158158 return this . createdVersion ;
159159 }
@@ -162,30 +162,14 @@ export class ContextService {
162162 this . createdVersion = version ;
163163 }
164164
165- getlastVersion ( ) : Version {
165+ getLastVersion ( ) : Version {
166166 return this . lastVersion ;
167167 }
168168
169- setlastVersion ( version : Version ) : void {
169+ setLastVersion ( version : Version ) : void {
170170 this . lastVersion = version ;
171171 }
172172
173- // getCreatedBy(): Update {
174- // return this.createdBy;
175- // }
176-
177- // setCreatedBy(createdBy: Update): void {
178- // this.createdBy = createdBy;
179- // }
180-
181- // getModifiedBy(): Update {
182- // return this.modifiedBy;
183- // }
184-
185- // setModifiedBy(modifiedBy: Update): void {
186- // this.modifiedBy = modifiedBy;
187- // }
188-
189173 getCheerioBody ( ) : cheerio . CheerioAPI {
190174 return this . cheerioBody ;
191175 }
0 commit comments