mirror of
https://github.com/matrix-org/synapse.git
synced 2026-05-14 00:46:27 +02:00
apply PR feedback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
73582c6bc7
commit
c0e468b543
@ -12,11 +12,13 @@
|
||||
# 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.
|
||||
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.storage.presence import UserPresenceState
|
||||
from synapse.types import UserID, RoomID
|
||||
from twisted.internet import defer
|
||||
|
||||
import six
|
||||
import ujson as json
|
||||
import jsonschema
|
||||
from jsonschema import FormatChecker
|
||||
@ -353,10 +355,8 @@ class Filter(object):
|
||||
ev_type = event.get("type", None)
|
||||
|
||||
content = event.get("content", {})
|
||||
is_url = (
|
||||
"url" in content
|
||||
and isinstance(content["url"], basestring)
|
||||
)
|
||||
# check if there is a string url field in the content for filtering purposes
|
||||
is_url = isinstance(content.get("url"), six.text_type)
|
||||
|
||||
return self.check_fields(
|
||||
room_id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user