Merge branch 'develop' into feat/emoji-picker-rich-text-mode

This commit is contained in:
Florian Duros 2022-12-07 09:57:41 +01:00 committed by GitHub
commit 4200c882e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 163 additions and 248 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import posthog, { PostHog } from 'posthog-js';
import posthog, { PostHog, Properties } from 'posthog-js';
import { MatrixClient } from "matrix-js-sdk/src/client";
import { logger } from "matrix-js-sdk/src/logger";
import { UserProperties } from "@matrix-org/analytics-events/types/typescript/UserProperties";
@ -196,7 +196,7 @@ export class PosthogAnalytics {
// we persist the last `$screen_name` and send it for all events until it is replaced
private lastScreen: ScreenName = "Loading";
private sanitizeProperties = (properties: posthog.Properties, eventName: string): posthog.Properties => {
private sanitizeProperties = (properties: Properties, eventName: string): Properties => {
// Callback from posthog to sanitize properties before sending them to the server.
//
// Here we sanitize posthog's built in properties which leak PII e.g. url reporting.
@ -222,7 +222,7 @@ export class PosthogAnalytics {
return properties;
};
private registerSuperProperties(properties: posthog.Properties) {
private registerSuperProperties(properties: Properties) {
if (this.enabled) {
this.posthog.register(properties);
}
@ -245,7 +245,7 @@ export class PosthogAnalytics {
}
// eslint-disable-nextline no-unused-varsx
private capture(eventName: string, properties: posthog.Properties, options?: IPostHogEventOptions) {
private capture(eventName: string, properties: Properties, options?: IPostHogEventOptions) {
if (!this.enabled) {
return;
}

View file

@ -124,10 +124,8 @@ export class PlaybackClock implements IDestroyable {
}
if (!this.timerId) {
// cast to number because the types are wrong
// 100ms interval to make sure the time is as accurate as possible without
// being overly insane
this.timerId = <number><any>window.setInterval(this.checkTime, 100);
// 100ms interval to make sure the time is as accurate as possible without being overly insane
this.timerId = window.setInterval(this.checkTime, 100);
}
}