diff --git a/src/components/views/elements/MessageEditor.js b/src/components/views/elements/MessageEditor.js index 1f3440d740..b07eca22b6 100644 --- a/src/components/views/elements/MessageEditor.js +++ b/src/components/views/elements/MessageEditor.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index c4eb6f8c7d..1fc16d6a53 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -1,6 +1,7 @@ /* Copyright 2015, 2016 OpenMarket Ltd Copyright 2017 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -136,7 +137,6 @@ module.exports = React.createClass({ if (messageWasEdited || stoppedEditing) { this._applyFormatting(); } - this.calculateUrlPreview(); } }, @@ -162,7 +162,7 @@ module.exports = React.createClass({ calculateUrlPreview: function() { //console.log("calculateUrlPreview: ShowUrlPreview for %s is %s", this.props.mxEvent.getId(), this.props.showUrlPreview); - if (this.props.showUrlPreview && !this.state.links.length) { + if (this.props.showUrlPreview) { let links = this.findLinks(this.refs.content.children); if (links.length) { // de-dup the links (but preserve ordering) diff --git a/src/editor/autocomplete.js b/src/editor/autocomplete.js index 731bb8d986..fa07ec56ff 100644 --- a/src/editor/autocomplete.js +++ b/src/editor/autocomplete.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/caret.js b/src/editor/caret.js index 3a784aa8eb..974c8802a4 100644 --- a/src/editor/caret.js +++ b/src/editor/caret.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/deserialize.js b/src/editor/deserialize.js index 569e166ab0..d440f9d336 100644 --- a/src/editor/deserialize.js +++ b/src/editor/deserialize.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/diff.js b/src/editor/diff.js index 6dc8b746e4..2c82e22793 100644 --- a/src/editor/diff.js +++ b/src/editor/diff.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/dom.js b/src/editor/dom.js index 0899fd25b3..ffdb8bed68 100644 --- a/src/editor/dom.js +++ b/src/editor/dom.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/model.js b/src/editor/model.js index 13066897b9..6b9c57a23c 100644 --- a/src/editor/model.js +++ b/src/editor/model.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/parts.js b/src/editor/parts.js index 1947be7d80..ad50009d49 100644 --- a/src/editor/parts.js +++ b/src/editor/parts.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/render.js b/src/editor/render.js index abc5d42fa1..caea18e3ca 100644 --- a/src/editor/render.js +++ b/src/editor/render.js @@ -1,5 +1,6 @@ /* Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/src/editor/serialize.js b/src/editor/serialize.js index 57cc79b375..1724e4a2b7 100644 --- a/src/editor/serialize.js +++ b/src/editor/serialize.js @@ -1,3 +1,20 @@ +/* +Copyright 2019 New Vector Ltd +Copyright 2019 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + export function htmlSerialize(model) { return model.parts.reduce((html, part) => { switch (part.type) {